Forum > General

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

<< < (3/4) > >>

Try to run without debugging?


--- Quote from: avra on January 13, 2022, 08:25:36 am ---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?

--- End quote ---
I've just done some tests.

On the old Win 10 Pc (i7-6850K) with Lazarus 1.4.4 executable (that has the memo with wordwrap on),
with the same text as previously tested, it takes 5 secs to paste it into the memo, but unlike with the other Lazarus version, loading the new form and clearing the memo as it loads is always instantaneous for each form load.

On the old win 10 pc, with the Lazarus 2.2 executable (that has the memo with wordwrap on), with the same text,
the first time into the new form is instantaneous. It also takes 5 secs to paste the text into the memo.
The 2nd time into the new form takes 11 secs for it to get to the memo cleared timer button (so a lot longer than with Lazarus 1.4.4).
Testing the Lazarus 1.4.4 executable on new Win 10 PC (3960X).

On the new win 10 pc, with Laz 1.4.4, with the memo with wordwrap on and using the same text as other tests.
1st time in the new form is instant. Pasting the text into the memo took 4 secs.
Each new load of the new form (where it clears the memo) is also instant.


--- Quote from: _Bernd on January 13, 2022, 12:03:05 pm ---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:

--- End quote ---
Thanks. Yes the Free Pascal version was 2.6.4 in Lazarus 1.4.4 (that's what it shows on my old pc).
That helps show there's an issue with the memos slowing down (at least with wordwrap which is enabled by default). Hopefully it will get fixed (though it seems it's been slower in the newer versions since about November 2016).

Though if I keep wordwrap off for my current app it should be okay, but it will likely still be an big problem with those that need to use memos with wordwrap when there's quite a lot of text (unless if there's something other than memo that could be used - one person in that thread is suggesting SynEdit - though I've not used that and it seems more complex and according to a post wordwrapping in that seems to have issues or is more difficult - there's not just a property for it like tmemo).

--- Quote ---Try to run without debugging?
--- End quote ---
I tested it with just clicking on the compiled .exe files (to give the results shown in my tests with the old vs new pc and old vs new Lazarus shown above.
Or if you mean it's compiled debug info into that .exe I could try changing the compiler options. Though with wordwrap off it works much faster/about instantly so for this project I can continue with wordwrap off.
But the slowdown of memos - with wordwrap on I think - seems to have been confirmed eg. with the thread linked above.

I don't think its the fpc version.

I would say it's likely that in 1.4.4 the wordwrap did not get triggered at this point.
Since then several wordwrap related bugs where fixed. Well possible that one of them made it necessary to change when the wrapping happens.

In the end, if you have a Memo with wordwarp enabled, and several 10k lines in it, you have to expect that at some time, to work needs to be done.

As to whether it could (or even should?) be avoided in your particular code flow, well that can't be told without knowing your code. And without having the time to do so. Comparison with 1.4.4 does not help here....


--- Quote from: Martin_fr on January 13, 2022, 10:00:50 pm ---In the end, if you have a Memo with wordwarp enabled, and several 10k lines in it, you have to expect that at some time, to work needs to be done.

--- End quote ---
Thanks for your reply. In my current project I can just leave wordwrap off in that memo as it doesn't really need it.

Though for it needing to do the work at some time, if it takes about 5 secs to paste the text into the memo box, and I assume it's doing the wordwrapping as it's being done (since pasting it with wordrwap off is instant), it seems unusual that it takes about 10 secs to load the form again and do the wordwrapping when it only took 5 secs to do it when it was pasted in. Also if it does the wordwrapping as soon as soon as the text is pasted in, and then the form is closed, maybe it could save the wordwrapping info somewhere to save having to do it again when the form is re-opened (though maybe it's releasing the memory when the form is closed, which may be okay but still I don't see why it's about double the time to wordwrap it on form re-loading than when it's pasted into the memo).


[0] Message Index

[#] Next page

[*] Previous page

Go to full version