Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 14 of 14 total
Thread TReader parsing problem with nested arrays
Sat, Mar 24 2018 8:34 AMPermanent Link

Walter Matte

Tactical Business Corporation

Also:

Add:   
 mleParse.Lines.BeginUpdate;
 mleParse.Lines.EndUpdate;

To test timing....


procedure TfrmMainJSON.btnParseClick(Sender: TObject);
var
 JP : TJsonParser;
 i  : integer;
begin
 JP := TJsonParser.Create;
 JP.IncludeEndElementTF := (cbEE.SelectionState = ssSelected);
 JP.ParseJSON(mleSource.lines.Text);
           
 mleParse.Lines.BeginUpdate;
 mleParse.Lines.Clear;


 for i := 0 to JP.json.Count - 1 do
 begin
   mleParse.lines.Add(JP.json[i]);
 end;
 mleParse.Lines.EndUpdate;

 JP.Free;
end;
Sat, Mar 24 2018 9:48 AMPermanent Link

Walter Matte

Tactical Business Corporation

Parsed 500K in 79 ms  ... how big was your json to get 10 seconds.

Walter
Sat, Mar 24 2018 12:34 PMPermanent Link

Uli Becker

> Parsed 500K in 79 ms  ... how big was your json to get 10 seconds.

It was the same json as in your sample, just unformatted (in one line).
Have to check that out further, just had a quick look this morning.

Uli
 
Sat, Mar 24 2018 12:48 PMPermanent Link

Uli Becker

Walter,
 
> Add:
>    mleParse.Lines.BeginUpdate;
>    mleParse.Lines.EndUpdate;
>
> To test timing....

Yes, that does the trick. Result is displayed immediately.
Thanks.

Uli
« Previous PagePage 2 of 2
Jump to Page:  1 2
Image