[Lazarus] Cairo library usage

Luiz Americo Pereira Camara luizmed at oi.com.br
Sat May 17 13:45:39 CEST 2008


Felipe Monteiro de Carvalho wrote:
> On Fri, May 16, 2008 at 5:48 AM, Graeme Geldenhuys
> <graemeg.lists at gmail.com> wrote:
>   
>> * What is your feeling about the library?
>>     
>
> It was found that cairo is the reason why lcl-gtk2 is so slow, and
> therefore, I don't like it very much =)
>   

Some facts:
 - LCL-gtk2 applications are slower than gtk2 pure applications
 - LCL does not use cairo directly to draw, it uses gdk
 - Gdk is faster than cairo
 - Gtk2 internally still uses gdk in most places

So assuming cairo is used a lot by gtk2 this could explain why Gtk2 is 
slower than Gtk1 but not that LCL-Gtk2 is slower than Gtk2.

Things to look when optimizing LCL-Gtk2:

 - Pango (FontConfig is called a lot in LCL-Gtk2 applications)
 - Double buffer is disabled

If the LCL devels agree in one week i can provide a complete separated 
Gtk2 interface so the changes to get LCL-Gtk2 faster can be done easily 
and without breaking gtk1

Luiz





More information about the Lazarus mailing list