[pygtk] Re: Expose Event, X-Server eats CPU

guettli+pygtk at thomas-guettler.de guettli+pygtk at thomas-guettler.de
Tue Aug 22 19:32:30 WST 2006


(Same message with code attached)

Hi,
 
I have simple Class to draw rectangles on top
of an image.
 
There is a very strange behaviour:
The first time drawing an rectangle is very slow. Then I reload
the same image and the drawing is fast. After rebooting the
computer it was the other way round: The first time it was
fast and the second time it was slow.
 
It is not the pygtk application which is slow. The X-Server
is using a lot of CPU.
 
You can test it like this:
python ImageWithAreas.py test.png
 
I know that my draw_all() method is very simple,
it redraws everything, not just a single part. But
it is fast enough, at least most of the time.
 
My event handlers are not slow. I guess there
is a problem between gtk and the X-Server.
 
Stock Ubuntu Dapper
python-gtk2 Version: 2.8.6-0ubuntu1
 
Suse 10.1 with python-gtk 2.8.2 does not have this
strange behaviour.
 
Any hints?
 Thomas

 
-- 
 Thomas Guettler, http://www.thomas-guettler.de/
 E-Mail: guettli (*) thomas-guettler + de
 Spam Catcher: niemand.leermann at thomas-guettler.de

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ImageWithAreas.py
Type: text/x-python
Size: 9098 bytes
Desc: not available
Url : http://www.daa.com.au/pipermail/pygtk/attachments/20060822/af8a9dbc/ImageWithAreas.py


More information about the pygtk mailing list