[lazarus] determining when loading of stream is done

Marc Weustink marc at dommelstein.net
Sun May 4 20:07:10 EDT 2003


At 07:53 5-5-2003 +0800, hernan.et at pg.com wrote:
>To Mattias/all,
>
>I am working on TStringText (a descendant of TStrings) for the Lines 
>property of TMemo. I came across a potential performance issue.
>  Here is the scenario, when running the application the streamed value of 
> lines property of TMemo comes one line at a time.
>  I can imagine that if my TMemo contains 50,000 lines, this will be a big 
> performance hit. Can someone explain or point to me when the streaming
>is done/finished relative to loading of application? I need this so that I 
>can send the data to gtk_text at once thereby avoiding the repetitive 
>insertion of data to the gtk interface.

OK, while loading the TComponent.ComponentState that the csLoading flag. 
Once loaded the virtual TComponent.Loaded gets called. So I would suggest 
to ignore updates to the interface while the csLoading flag is set and 
update the text in the overridden Loaded.


Marc






More information about the Lazarus mailing list