[Lazarus] Performance of GTK 2 and CE

Graeme Geldenhuys graemeg.lists at gmail.com
Mon Nov 10 21:44:12 CET 2008


On Mon, Nov 10, 2008 at 7:39 PM, Mark Morgan Lloyd
<markMLl.lazarus at telemetry.co.uk> wrote:
> x86 800MHz laptop Debian "Lenny" 0.9.26/2.2.2
>        local
>                gtk       3.7
>                gtk2     13.7
>        remote
>                gtk      10.0
>                gtk2     60.4


Wow, even local GTK2 is *way* slower than GTK1.  So I really wasn't
imagining it when I switch Lazarus IDE to GTK2.

I was curious to see what it does on my system. So I created a test
based on what you said. I used GTK1, GTK2 and fpGUI toolkit. In all
three tests all component where the exact same size and contained the
exact same text.  Here are my results from the following code:

-----------------------------------------------
procedure TForm1.Button1Click(Sender: TObject);
var
  i: integer;
  s: TDateTime;
  e: TDateTime;
begin
  s := Now;
  for i := 1 to 1000 do
  begin
    if (i mod 2) = 0 then
      Panel1.Color := clRed
    else
      Panel1.Color := clBlue;
    Application.ProcessMessages;
  end;
  e := Now - s;
  writeln('Duration: ' + FormatDateTime('nn:ss.zz', e));
end;
-----------------------------------------------

Clearly GTK2 is as speedy as a snail !!! :-(


graemeg at graemeg-laptop:speed$ ./project1_gtk1
Duration: 00:00.229
Duration: 00:00.219
Duration: 00:00.231
Duration: 00:00.238
Duration: 00:00.306
graemeg at graemeg-laptop:speed$ ./project1_gtk2
Duration: 00:01.127
Duration: 00:01.065
Duration: 00:01.158
Duration: 00:01.055
Duration: 00:01.119
graemeg at graemeg-laptop:speed$ ./project1_fpgui
Duration: 00:00.275
Duration: 00:00.275
Duration: 00:00.274
Duration: 00:00.276
Duration: 00:00.276



Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/



More information about the Lazarus mailing list