[Lazarus] Inserting many components on form

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Jun 27 21:21:29 CEST 2011


On Mon, 27 Jun 2011 16:04:49 -0300
"fluisgirardi at gmail.com" <fluisgirardi at gmail.com> wrote:

> I wrote a component editor that can insert some components on a form or data
> module. But when I insert many components, the performance of lazarus is
>  terrible. Inserting 510 components on my I5 540M with 8Gb of Ram takes 14
> seconds. If I try insert 1020 components, this action takes 52 seconds.
> If I try insert 4000 components, I don't know how many time this action
> takes, because it freezes the Lazarus for a long time.
>[...]
> Somebody did something like this? Am I doing something wrong? What's the
> Lazarus pieces that mus be improved to perform this action more fastest?

TComponent uses linear searches/notifications for each operation. So
1000 components is a bad idea.
LCL adds even more searches/notifications, so 300 components is a bad
idea.


Mattias




More information about the Lazarus mailing list