Recent

Author Topic: Very slow controls redrawing in my program (GTK2, Linux) after migrating to 1.4  (Read 1397 times)

PVOzerski

  • Newbie
  • Posts: 2
Hi,
I wrote some years ago a two-threading program (a computer simulation of ecological competition) with graphical output (GTK2 on Linux). Initilally it was developed under Lazarus 1.2.x and then it worked correctly. After the Lazarus upgrade to 1.4 version I recompiled this my program. Now it redraws controls and graphics unacceptably slowly. Interestically, when I recompiled it to use qt toolkit, the qt version runs quite fast. Both 64- and 32-bit versions demonstrate the same problem.

I think, my problem could be important not only for me, because this may be a bug in LCL. I'm ready to upload the program source code and to answer all program-related questions.

Sincerely, Pavel

PVOzerski

  • Newbie
  • Posts: 2
I found that the problem is probably in TSpeedButton.Refresh. A code to demobstrate this is very simple:

procedure TForm1.Button1Click(Sender: TObject);
var
  i: integer;
begin
  for i := 1 to 300 do
    begin
      SpeedButton1.Left := SpeedButton1.Left + 1;
      SpeedButton1.Refresh;
    end;
end;

You can compare the speed of the Speedbutton1 moving using qt, GTK2 and also GTK wth disabled Refresh method. On my comp the second variant is essentially slower than two others.

 

TinyPortal © 2005-2018