Fastest GUI toolkit?

Ionel Simionescu ionel at psy.uva.nl
Mon Nov 8 14:45:48 EST 1999


Gordon Williams <g_will at cyberus.ca> wrote in message
news:01bf29f1$cbfd5e60$5a41c3d1 at Cyberus.cyberus.ca...
|
| I have an application where I need to draw many lines fast and repeatedly
| (an oscilloscope).  The number of lines ranges from about 1000 to 16000.
| Currently I have the application using Tkinter but I am finding it too
| slow.  I am currently using W95 as an os, but would prefer to make the
code
| portable across other os if possible.  Right now speed is more important
| than portability so I would be willing to give this up.
|
| I would like to draw 1000 lines in 1/10 of a second on a P166 machine.
(Am
| I way off the mark??)  I was hoping that someone would have tried
different
| packages and could give me pointers in the right direction.


Hi Gordon,

I've just tried your test with a simple wxPython application and it almost
makes it.

My system is Windows NT, P200, 64M.

The test app draws 1400 lines in .25 seconds (with the same pen).
For 1000 lines, it takes 0.18 seconds.

wxPython is also offering an easy to use OpenGL interface, from which I
expect much better performance.

Given your needs, I suggest that you should consider seriously using OpenGL,
rather than trying your own optimizations. This choice would give you good
and scalable performance irrespective of the platform.

Just naive GDI calls won't do, I'm afraid.
However, if you need something quick, you may consider to draw in a memory
DC (i.e. a bitmap) first and copy the end result to the screen. That will
hopefully make the time drop under your .1 second mark.

---
ionel

References:
wxPython:
http://alldunn.com/wxPython/








More information about the Python-list mailing list