You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.8 KiB

From: da at (David Ascher)
Date: Mon, 19 Apr 1999 16:24:30 GMT
Subject: Tkinter performance
In-Reply-To: <>
References: <>
Message-ID: <>
Content-Length: 1494
X-UID: 410
On Mon, 19 Apr 1999, Greg Landrum wrote:
> 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'd suggest using PyOpenGL with the NumPy extension. In combination, it
can be quite fast, by pushing the loops to C extension modules. The only
portability problem is to the mac -- there is no Togl widget for the mac
--david ascher