Re: Is GTK+ 3.x 2x slower than GTK+ 2.x?



Hello Javier,

On 10 November 2011, Javier Jardón wrote:
> Could you run the test again against the current stable GTK+
> version? (GTK+ 3.2) Some optimization work has been done in that
> release.

OK. As I can't test it on the original machine anymore, I'm going to
show the results on my current PC with both the "old" GTK+ 3.0 and
3.2 for comparison. The PC is an AMD Phenom II X2 560 3.3 GHz,
8 GB RAM, ATI Radeon HD 5570 with the open-source Radeon driver.

So, Ubuntu 11.04 64-bit, GTK+ 2.24.4 and 3.0.8, Raleigh, Xfce 4.8:

Startup, GTK+ 2.24.4: 0.04573 s, GTK+ 3.0.8: 0.06304 s
Test 1, GTK+ 2.24.4:  2.13784 s, GTK+ 3.0.8: 3.53960 s
Test 2, GTK+ 2.24.4:  0.77192 s, GTK+ 3.0.8: 0.94936 s
Test 3, GTK+ 2.24.4:  1.15307 s, GTK+ 3.0.8: 2.84490 s

Ubuntu 11.10 64-bit with GTK+ 2.24.6 and 3.2.0, Xfce 4.8:

Startup, GTK+ 2.24.6: 0.04299 s, GTK+ 3.2.0: 0.05390 s
Test 1, GTK+ 2.24.6:  2.04237 s, GTK+ 3.2.0: 3.09297 s
Test 2, GTK+ 2.24.6:  0.72487 s, GTK+ 3.2.0: 0.86391 s
Test 3, GTK+ 2.24.6:  1.61771 s, GTK+ 3.2.0: 3.06573 s

And the default Ubuntu Ambiance theme, GNOME 3.2 fallback:

Startup, GTK+ 2.24.6: 0.04851 s, GTK+ 3.2.0: 0.07288 s
Test 1, GTK+ 2.24.6:  3.54489 s, GTK+ 3.2.0: 3.35936 s
Test 2, GTK+ 2.24.6:  3.14715 s, GTK+ 3.2.0: 2.59613 s
Test 3, GTK+ 2.24.6:  1.51808 s, GTK+ 3.2.0: 4.22106 s

Fedora 16 64-bit, GTK+ 2.24.7 and 3.2.1, Raleigh theme, Xfce 4.8:

Startup, GTK+ 2.24.7: 0.04944 s, GTK+ 3.2.1: 0.06019 s
Test 1, GTK+ 2.24.7:  2.32610 s, GTK+ 3.2.1: 3.37806 s
Test 2, GTK+ 2.24.7:  0.85562 s, GTK+ 3.2.1: 0.95699 s
Test 3, GTK+ 2.24.7:  0.85560 s, GTK+ 3.2.1: 2.60784 s

And the default GNOME 3 Adwaita theme:

Startup, GTK+ 2.24.7: 0.05438 s, GTK+ 3.2.1: 0.10977 s
Test 1, GTK+ 2.24.7:  2.15700 s, GTK+ 3.2.1: 3.33444 s
Test 2, GTK+ 2.24.7:  8.69504 s, GTK+ 3.2.1: 8.68407 s
Test 3, GTK+ 2.24.7:  2.76004 s, GTK+ 3.2.1: 4.73523 s

I haven't tried GTK+ 3.2.2 yet (should I?)

I'm not sure I'm comparing apples and apples. Even though I always
compare "the same" theme for both versions (Raleigh vs. Raleigh,
Ambiance vs. Ambiance, Adwaita vs. Adwaita), the themes are similar,
but not exactly the same. So I don't know if the 3.x themes are
using different engines or something (this certainly seems to be the
case at least with the extremely slow Adwaita theme), which could be
slower than the 2.x engines. So I don't know if it's a matter of GTK+
2.x vs. 3.x or just one theme engine against another. Also, I don't
know if these results are ATI/AMD specific (I have a limited number
of PCs to test it on.)

Anyway, the common theme in all the tests I have done on all HW and
SW configurations is the slow window creation in GTK+ 3.x (test 3,
this could probably explain the slower startup, too.) But there are
other, even less scientific methods to check these things, like for
example hovering the mouse cursor over a toolbar in a GTK+ 2.x based
application (gedit 2.x) and the same toolbar in GTK+ 3.x (gedit 3.x).
On my PC, the 2.x version consumes about 14% of a single core
(8% gedit, 6% Xorg), the 3.x version takes about 29% (18% gedit,
11% Xorg). Both using the simple default Raleigh theme. (The
difference is smaller with the Ubuntu Ambiance theme, but it is still
there).


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