Re: kde people is saying gtk is slow...



>[...] This is of course
> > 10 times slower than libsigc++, but then any string based system is
> > going to be a bit slow. [...] (Gtk+ has a lot more things
> > which it does like create emission records for emission stops which
> > means many function calls, and thus a slower system.)


> I don't understand you correctly. You say here, that Gtk+ is "a slower
> system", but above you say that Gtk+ emits signals about 3 times faster than
> Qt. What am I missing?

Something fairly obvious, it isn't slow at all compared to Qt but
is to libsigc++.  Qt and Gtk+ are both string based emission 
systems.  All string based emission systems are going to be slower
and a totally hardwired system like libsigc++.  If comparing gtk+
to Qt,  gtk+ emits signals 3 times faster at least for the one
signal case.  Gtk+ would be slower at emitting if you get sufficiently
large numbers of signals connected to a widget, because gtk+ uses
only one signal list which is an O(n) where n is the number of
handles connected.  Assuming the gtk+ signal system to glib rewrite is
good hopefully it will be O(log(m)) where m is the number of
signals connected.   

Gtk+ is slower than the fastest possible hardwired system partially 
because of string usage but mostly because of global emission list
manipulation.  But a global emission list is part of gtk+ design so
you can't really fault it for speed.  Considering it is still 3 times 
faster than C++/MOC in Qt, that really isn't a bad place to be.


> I think the main reason why Gtk+ seems slow is that the drawing events aren't
> handled correctly in the GDK layer or maybe with some Gtk+ themes (there
> themes that seem to redraw at slow motion, sincerely). I'm willing to see the
> new Gtk+ 2.0 fixing all this stuff. Owen has been working hard on this, so
> it's just a matter of time.
> Of course, it's clear to everyone (or at least should be this way), that we
> want faster redrawing in Gtk+/Gnome (Mozilla included, the future
> Nautilus,...) that we have now, because this is a thing that windows and kde
> people aren't going to lose in their desktops...

No dispute there.  I was just reporting finding that owen had asked
me to measure many moons ago and I had just been too lazy to document. :-)

--Karl







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