tcl/tk vs. python/Tkinter - Example attached

Daniel Kramer daniel at visionart.com
Fri Jun 16 04:09:39 EDT 2000


> > Since I am new to this lang I was just wondering if there was a way to
> > get better python/TK performance... if anyone could try out the examples
> > and let me know.. for me the tcl/tk one feels much more responsive but I
> > don't have any hard numbers to prove that.
>
> > I have been reading that wxWindows is the much faster solution.. but I
> > am very familiar with TK and it's plenty fast for what I need.. but I
> > worry that the Tkinter ver won't be fast enough once I add alot more to
> > it.
>
>
> > -Daniel
>
>
>
>   Just adding my 2 cents here. I think I see  a very slight difference
>   on  my linux machine with all the latest versions of
>   interpreters. It's a celeron 366 with 128 Megs of RAM.
>   The python version seems just a tiny bit slower if I move the boxes
>   around very fast. And oh, the difference almost disappears for me on
>   commenting out the following line.
>
>      self.canvas.itemconfig(Node.currentNode[0] + "_base",fill = "red")
>
>      Could this change in color be causing the  perception of
>      jumpiness....?? The boxes always remain grey in the tcl version.
>
>
>       Chetan
>
Path: news!uunet!ffx.uu.net!newsfeed.easynews.net!easynews.net!newsfeed.germany.net!newsfeed01.sul.t-online.de!newsfeed00.sul.t-online.de!t-online.de!newsfeed.icl.net!newsfeed.direct.ca!newshub2.rdc1.sfba.home.com!news.home.com!news1.alsv1.occa.home.com.POSTED!not-for-mail
Xref: news comp.lang.python:99881


I think I have just confirmed to myself that it's quite a bit slower.. it's
at least more cpu dependent then tcl/tk.   I taxed my cpu very heavily with
another program (I started rendering an image w/a raytracer).. then I opened
both the tcl/tk and the python/tkinter versions of the canvas program.. the
tcl/tk showed minimal slowdown, it was still very fluid.. while the
python/tkinter one was very choppy in comparison..

It sounds like python is doing alot more work translating the info to tk.. I
wonder if this will improve in the future.. it's makes me hesitant to start
a project on python/tkinter.

-Daniel






More information about the Python-list mailing list