From: landrum at foreman.ac.rwth-aachen.de (Greg Landrum)
Date: Mon, 19 Apr 1999 17:26:49 +0200
Subject: Tkinter performance
Message-ID: <371B4B39.8B78BC7A@foreman.ac.rwth-aachen.de>
Content-Length: 1508
X-UID: 1117                                                  

While I'm at it, I have a performance question about Tkinter.

I am thinking about doing a python/Tkinter port of a program
which currently uses C/Xlib (or C/quickdraw on the Mac). I'd
love to get this to work because then I would (finally) have
a version which could work under Win95/98/NT.  But I'm worried
about performance issues.

The program does 3D graphics (molecular/crystal visualization
and orbital plots).  I handle all of the perspective/transformation
stuff myself, so I don't need any 3D functionality.  I do need
something which can draw reasonably quickly however.

Suppose I need to draw a couple hundred circles and several
thousand line segments (these are mostly connected, so I can
use things like XDrawLines to cut down function calls) at
every update.  
1) Can Tkinter on a "typical" PC (say a P200) deliver a 
"reasonable" update rate (a couple of frames per second 
would probably cut it)? 
2) Is there anyway to do double-buffering to avoid flashing
during redraws?

I am guessing that the answer to both of these of these questions
is "No", but I'd love to hear a contrary opinion.

I have considered using something like wxPython, but that cuts
the portability of the application down rather than increasing
it.  At least until there are bindings for the Motif/Lesstif
versions of wxWindows.

thanks for any help,
-greg

-- 
---------------------
Dr. Greg Landrum  (landrum.NOSPAM at foreman.ac.rwth-aachen.de)
Institute of Inorganic Chemistry
Aachen University of Technology




