On Tue, 25 Jul 2006 09:49:03 +0200
Micha Nelissen <[EMAIL PROTECTED]> wrote:
> Michael Van Canneyt wrote:
> > Creating a separate GUI object for each object in your database is a
> > very bad idea;
> > I worked with such programs, and at 250 tables in the model, such
> > programs become
> > incredibly slow. A redraw takes forever.
>
> TGraphicControls like TBevel and TCustomLabel should be ok, as they are
> drawn by the LCL (also clipped IIRC, Mattias?) and do not consume
> OS/widgetset resources.
Yes, they are clipped.
I just tested: 1000 TShapes in a TScrollBox are no problem. Although it
needs double buffering.
Under gtk you can also put 1000 buttons without problem.
And 1000 TListBoxes with 20 items each are slow, but still usable.
Although the LCL caches write warnings because they suspect a leak. ;)
I tested cross compiled under wine:
It is really slow.
So, the LCL does not scale too bad.
Maybe someone wants to test under native window:
procedure TForm1.FormCreate(Sender: TObject);
var
i: Integer;
j: Integer;
begin
for i:=0 to 999 do begin
with TListBox.Create(Self) do begin
SetBounds((i mod 33)*50,(i div 33)*50,50,50);
for j:=1 to 20 do
Items.Add(IntToStr(j));
Parent:=ScrollBox1;
end;
end;
end;
Mattias
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives