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



On Thu, 2006-09-28 at 20:13 +0200, Adalbert Dawid wrote:

> 1. GtkTreeView's repaints are slow. This gets especially obvious, when you
> perform one of the actions below:
>  * Resize a column (i.e. change its width). You will notice that the
>    header is badly lagging behind the mouse pointer, which gets worse as
>    one enlarges the viewport.
>  * Drag an icon from the Desktop over a big nautilus window with many
>    files and directories in the list view mode. When you keep moving the
>    icon over nautilus, the CPU goes up to 100% and the icon leaves an ugly
>    white trail.

What theme engine are you running?

Are you running a compositing manager?  If so, which one, and which
graphics driver do you have?

On my non-composited, Xorg Radeon setup (IBM Thinkpad T41p), I don't get
lagging when I resize the columns in Nautilus's list view.  I get only
minimal trailing (1 or 2 "positions") when I do drag and drop over it.
I'm using Novell's "Gilouche" theme, which is essentially pre-Cairo
Clearlooks.

Can you run a global profiler like sysprof to identify the culprit?

Apart from that, GtkTreeView *does* have problems.  GtkCellRendererText
is written in a way that each repaint cycle causes it to re-layout the
same string two or three times.  On a treeview with a lot of text, this
is the hotspot in the profile:
http://primates.ximian.com/~federico/news-2005-10.html#gtkfilechooser-profile-4

That doesn't look terribly hard to fix; it's just that no one has done
it yet :)

We need a set of benchmarks for GtkTreeView.  I'd start with comparing
various operations (layout, column resizing, repaint, etc.) between a
treeview with no-op cell renderers, and busy text renderers.

> 2. Resizing of GTK windows is slow. This effect, too, is getting worse
> the bigger the resized window is. It is very interesting to see, that a
> really small (say, 200*200 pixels) window can be resized pretty smoothly,
> even if it is full of widgets that need to be layouted. Another
> observation is, that even an empty GTK window (i.e. one with a plain grey
> backgroud and no widgets) repaints really slowly when you resize it on a
> screen with high resolution and drag it large.

Again, which theme engine, and which compositing manager?  Does your
engine paint gradients or other exotic stuff on the otherwise plain
window background?

With my setup, an empty window resizes quite quicly.  It is a bit slower
when the window gets close to full-screen (1400x1050), but I can't get
it to lag or anything.

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.

  Federico




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