Forum > General

Lazarus 2.2 seems to be a lot slower loading a form than Lazarus 1.4.4

<< < (2/4) > >>

trev:
What happens if you clear the memo when you close the form instead of clearing the memo when you open the form?

Martin_fr:
ok, I did a test here.

Dropped a memo on a form (2nd form, so form1 can reopen the form, once I closed it).
Copy and pasted 40k lines. => all fast (paste takes maybe 1 second).

But, I had the memo wide enough for each line to fit without wrapping.
And, if I resize the memo (alclient, resize form), yes well that takes time / maybe 3 or 4 seconds).

However, if I put "Form2.Width := 200;"  into the OnFormShow => that takes about 10 secs (if I do it before the lines are cleared).

avra:
Did you test Lazarus 1.4.4 executable from old machine on your new machine?
Did you test Lazarus 2.2 executable from new machine on your old machine?
How do they behave?

Pi:
Thanks a lot everyone.  :)

It seems the main issue was the width of the memo and the amount of text causing lots of word wrapping that takes it a long time (eg. about 13 secs) when the new form loads with it.
I could increase the memo width further and that should help since it should cause less word wraps, and be easier to check visually if needed (though I rarely need to check it that way).

For now I've turned off word wrapping as the word wraps don't matter to the procedure that processes the memo text. That's made the number of memo lines for that same text go from 29,333 to just 730.
That's made it load about instantly each time when it has that amount of text and has speeded up the pasting into the memo (it now does it about instantly). And clearing it with mem_name.clear takes 00:00.004 or 00:00.005.

I've also added the memo clear in the form's OnClose event. I've tried that with the word wrap turned on and that does speed up the re-loading of the new form after it had that text pasted into into previously thanks for the suggestion. Though with word wrap turned off the difference isn't as much (but it will help if I ever need to turn it back on or have it turned on in some other app). I think I'll keep word wrap off for now as that speeds up the pasting into the memo and it doesn't affect the processing of the memo text by my procedure.

I'll try checking the old and new machine with the Lazarus 1.4.4 and Lazarus 2.2 executables later to see what the differences are with this. Thanks.

_Bernd:
Hello,

maybe this also has something to do with the fpc version. Lazarus 1.4.4 was probably still based on fpc 2.x. I had noticed something similar during the transition from Lazarus 1.4.4 to 1.6:

https://www.mail-archive.com/lazarus@lists.lazarus-ide.org/msg01461.html

But I can't remember how that turned out.

Regards, Bernd.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version