Re: Performance of many widgets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3 January 2011 21:51, Brian Phelps <lm317t@xxxxxxxxx> wrote:
> I tried the plain default theme BTW and it made no discernable
> difference in speed to the GTK/C implementation.

I tried here and on a Ubuntu 10.10 install on a recent macbook with
the Ambiance theme your example was rather slow. There was an
appreciable delay (0.5s? something like that) between pressing the
top-left button and the display updating.

I tried running under callgrind and it does seem to be spending a lot
of time somewhere deep inside libcairo (the graphics library that gtk
uses to draw the screen). I don't have a dbg version of cairo handy to
dig deeper.

If I run with "time" and press the toggle button 10 times, I get:

$ time ./main
real	0m18.022s
user	0m5.040s
sys	0m0.300s

I installed the gnome-themes-extra package, plus a thing called
gtk-theme-switch, and swapped to the "redmond" theme. This is just
hideous (a win95 lookalike) but does use very simple drawing
operations to display the widgets. With the redmond theme, display
updates are instant (or seem to be).

For 10 button presses I get:

$ time ./main
real	0m13.190s
user	0m0.360s
sys	0m0.060s

So, more than 10 times faster. Brian, have you tried a simple theme
like this (ugly square buttons, no gradients)?

Comparing a browser to gtk is perhaps a little unfair. This test is
spending almost all its time in the graphics library, not in gtk, so
you are really comparing the speed at which a browser can display
bitmaps (rather fast) to the speed libcairo can draw gradients and
anti-aliased curved lines (comparatively rather slow).

Though it does seem sluggish, even so. Perhaps there are some simple
changes that could be made to togglebutton, Ambiance or cairo to speed
it up. I don't have time to investigate, sadly :-(

John
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list


[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux