Memory and speed with lots of objects on Tkinter.Canvases

Mickel Grönroos mickel at
Mon Jan 19 15:35:55 CET 2004

Hi everybody,

This is a question about Tkinter.Canvases and performance:

I am writing a Tkinter application that among other things contains a
number of Tkinter.Canvases that in turn hold rectangle and text objects
that can be moved along with clicking and dragging the mouse. Everything
works fine and well when I have just a few of these objects on the
canvases, but when the number of objects on the canvases grow over a
thousand, the application gets really sluggish. (I am running Python 2.3.2
on Redhat Linux 9 on a 866 MHz Pentium III with 256 MB of RAM (and approx.
0.5 GB of swap space, if that matters ...).)

Does anybody else have experience with having thousands of objects on
Tkinter.Canvases and how this impacts on the speed of the application? Are
there any nice tricks for tuning up performace when having lots of objects
on Tkinter.Canvases?

Help! :)


Mickel Grönroos, application specialist, linguistics, Research support, CSC
PL 405 (Tekniikantie 15 a D), 02101 Espoo, Finland, phone +358-9-4572237
CSC is the Finnish IT center for science,

More information about the Python-list mailing list