Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-05

determining when loading of stream is done

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

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.

Thanks in advace,
Yoyong Hernan

Reply by email

Marc Weustink
to Unknown author
Show quoted text 11 lines
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

Reply by email