Speeding up the Canvas Widget
Salim Zayat
zayats at blue.seas.upenn.edu
Fri May 31 15:39:59 EDT 2002
I have been having problems with the Canvas widget in terms of just
speed. I need to draw, and almost constantly redraw, upwards of like
10,000 or so things to the canvas (lines, text, and rectangles, etc.).
The larger the number of things to be drawn, the slower it is. I went on
the tcl/tk newsgroup, and apparently this is a problem for them too. So
I was just wondering if anyone has some sort of cheats that could be used
to speed it up. They mentioned the overhead in the CanvasItem being
called, so maybe being able to treat 1000 polygons as one item and only
one call to CanvasItem. I dont know how applicable that is to Tkinter
but still.
I know I am not exactly beeming with info here, but I have been
struggling with this lag issue for a while, and I am not sure whether it
is worth it to continue, or try experimenting with other packages (maybe
pyGTK or something).
Salim
More information about the Python-list
mailing list