[Gtk2] About bug 11523: analysis and proper fix(es)

Paul Ishenin webpirat at mail.ru
Sun Jul 13 14:40:17 CEST 2008

Luiz Americo Pereira Camara wrote:
> No.
> There are two theoretical benefits in 3:
>  - If the length of the NewText is different from the OldText skip the 
> string comparation
>  - CompareBytes is supposed to be faster than StrComp since is hand 
> optimized (asm) and don't need to check for PChar length/ending
> The overhead of storing the oldlength using g_object function can be 
> removed by storing as a field in the TGDIObject record. I did not tried 
> that because i don't know the effects of adding an extra field. Also the 
> function should be modified to receive a font object instead of a pango 
> layout.
Simplier ways are better - less chances to make a bug. Anyway with any 
optimization we have about 2 time faster Canvas.TextOut in gtk2.

And thanks for research.

Best regards,
Paul Ishenin.

More information about the Gtk2 mailing list