jerky viewport scrolling performance GTK+



Hi,

 I am new to GTK+ so the question may be dumb.
We are buidling an image viewer / annotator using glade-2:

glade-2 1.1.3
libgtk-1.2.so.0.9.1
libgtk-x11-2.0.so.0.200.1
libpango-1.0.so.0.200.1
libpangoxft-1.0.so.0.200.1
libgcc_s-3.2.2-20030225.so.1
Hardware: 3 GHz/1 GB.
OS: Linux RH 9.

When using a simple window with one viewport and an embedded gtkimage, scrolling is very jerky (20MB greyscale image), just using out-of-the box glade with very little adaptation of callback.c. The .tif file is loaded in a pixbuf (once), the pixbuf is set into the gtkimage (once).
Horizontal scrolling is reasonable, vertical scrolling is a drama.
Looking at the same image with eog (eye of gnome), scrolling is superbly smooth. Using gtkviewer, scrolling of the same image is somewhat slower but still better than our homebrew thing. I also noticed that event transmission to the window manager (e.g. start resize or drag window) is sluggish. Resident memory of this small application (indicated by top): 76 MB. Idle cpu load is higher than normal. Replacing gtk_main by an event iteration loop with usleep(1000) (1ms) as a 'yield' did not give noticable improvement or deterioration. No hand-coded event handling has been added on top of the pre-cooked event handling.

Where is the trick? Apparently we are missing some point...

Lambert Schomaker

_________________________________________________________________
MSN Search, for accurate results! http://search.msn.nl




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