John Hunter wrote:

If I have a dialog with a button, and add a label to the button, the
dialog box can take 30-60s to load. For example, with the
helloworld.py example code in the tutorial:

http://www.moeraki.com/pygtktutorial/pygtk2tutorial/examples/helloworld.py

if I comment out the button line and remove the label with

#self.button = gtk.Button("Hello World")
self.button = gtk.Button()

then the remote application will launch immediately. I am working
over X windows with X forwarding. Has anyone seen something like this
before? It is not a connection speed problem: my interactive controls
which rescale axes and do other more complicated things work almost
instantaneously. I've only observed the lag when building buttons
with labels.

I have the same problem in the application I'm developing and in the
pygtk-demo code.

I suspect, but am not sure, that this has something to do with X11
forwarding. Perhaps something to do with server and client trying to
find an appropriate font? If I run top on X server and client during
this lag, no process is consuming an exceptional amount of resources.
It's more like the process just goes to sleep for about a minute.

This is probably Pango querying the X server for what fonts it supports. You could reduce this delay with one of two methods:

1. cut down the number of fonts available on the X server
2. use client side fonts by exporting GDK_USE_XFT=1

The second option is preferred if it is available to you. All font metrics are available on the client side in this case, and only the outlines that are actually used are transferred to the X server. It will give you antialiasing as well.

James.

--
Email: [EMAIL PROTECTED] | Linux.conf.au http://linux.conf.au/
WWW: http://www.daa.com.au/~james/ | Jan 22-25 Perth, Western Australia.


_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Reply via email to