[Lazarus] Inserting many components on form

fluisgirardi at gmail.com fluisgirardi at gmail.com
Mon Jun 27 22:41:58 CEST 2011


2011/6/27 Mattias Gaertner <nc-gaertnma at netcologne.de>

> On Mon, 27 Jun 2011 16:31:56 -0300
> "fluisgirardi at gmail.com" <fluisgirardi at gmail.com> wrote:
>
> > 2011/6/27 Mattias Gaertner <nc-gaertnma at netcologne.de>
> >
> > >
> > > 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.
> > >
> > >
> > And to make 4000 or 10000 components a good idea, what's must be changed?
>
> A lot.
> Are you sure you need that many components? For example some components
> uses TCollection and other classes to handle thousands of objects.
> Maybe if you explain what you want to achieve people can give an advice.
>
>
Maybe I started my components with a wrong concept. Each component,
represents a memory (or a set of memories) on a remote device (like a PLC)
that can be read and/or written. These components can be linked with edits,
labels, progress bars and others controls created to show/modifies/stores
the value of these components.

For now, I did only small projects using these components (using ~150 tags
or components). Today, I started my first big project. On the first time,
using the component wizard, I inserted 255*5+1 components. This action takes
some time. After this, I tried using my wizard again, to insert 4000
components, and after this the IDE freezes.

I thought use the TCollection, but I don't know if I can represent the
following configuration (it's a example, it can have how many PLCBlocks,
BlockItems, TagBit, PLCNumbers or PLCStrings the owner of project wants):

Owner (TCollection)
   |
   |-> PLCBlock (now, each below is a component)
   |       |
   |       |-> BlockItem (0..n items)
   |       |-> BlockItem
   |       |       |
   |       |       |-> TagBit (0..n items)
   |
   |-> PLCBlock
   |       |
   |       |-> BlockItem (0..n items)
   |
   |-> PLCNumber (0..n items)
   |       |-> TagBit (0..n items)
   |
   |-> PLCString (0..n items)

Some idea?


The best regards,

Fabio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110627/9eb7fa0d/attachment-0003.html>


More information about the Lazarus mailing list