> It's interesting to note that if I add a single button to the window,
> then it gets noticeably slower (but it doesn't lag, either). Then,
> Sysprof says that 69% of the time is spent in libfb/libxaa in the X
> server, not GTK+ itself.
I discussed with Markku Vire today some performance-related stuff, and
actually this same thing came up.
He had taken GTK+ 2.10, ran gtk-demo with buttons and resized the
window like mad. Sysprof indicated that some (IIRC) 75% of the time
was spent within X (dunno the exact setup). There was some funkyness
with expose propagation (fetching a style property _every time_,
yikes!) but even if you'd optimize the whole section of GTK+ code to
be faster, that would yield a very tiny improvement. So it really
seems to be something in the way GTK+ uses X (or graphics in general)
.