Re: Gtk performance issues from a user's point of view



"Kalle Vahlman" <kalle vahlman gmail com> writes:

> 2006/9/29, Federico Mena Quintero <federico ximian com>:
> > 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)
> .

With recent X servers (6.9 and later) sysprof can actually report what
goes on inside the X server. To do that,

- get your distribution's debug package for X (on Fedora it is
  xorg-x11-server-debuginfo). Alternatively compile the X server
  yourself.

- run sysprof as root (since the X server binary for bogus reasons is
  installed as readable only by root).

Oprofile should also be able to report X server symbols, but I don't
know exactly how to do that.


Soren



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