Tkinter displaying 300 records sluggish

Eric Brunel eric.brunel at
Mon Mar 10 10:02:28 CET 2003

Irene Barg wrote:
> Hello All,
> I have a Tkinter/PMW GUI interface to a flatfile (in memory) database 
> (FlatDB, written by Colin Svingen). When displaying 300 records, it takes approx 
> 10 seconds on a Sun Ultra 60 2x360MHz, with 1024MBytes RAM running under 
> Python 2.1, and scrolling through the results is slugish. On a Toshiba Satellite 
> Pro, Pentium 4, 1.70GHz CPU, 260MB RAM, running RedHat Linux (v8.0)and Pytho2.2, 
> it takes approx. 5 seconds to display 300 records, but scrolling is much faster. 
> The result set is a list of lists. The actual size of the db is only 97K, which 
> shouldn't be a problem with either machine. Are there any coding techniques to 
> improve performance with Tkinter? Has this been documented anywhere?
> The portion of code that handles the looping through the results follows.  
> I appreciate your comments. --irene barg
[snip code]

Looking at your code, I don't see any reason why you get these performances. But 
  since the code is incomplete, it's actually quite hard to tell (e.g., what 
does the method called "lineheight"?)

BTW, did you try to run your code through the profiler? You may discover that 
Tkinter is not the cause of the problem...
- Eric Brunel <eric.brunel at> -
PragmaDev : Real Time Software Development Tools -

More information about the Python-list mailing list