Tkinter and Swing performance
Mike Clarkson
support at internetdiscovery.com
Sat Jun 9 15:18:49 EDT 2001
On Sun, 27 May 2001 17:11:50 GMT, "C.L" <no at spam.org> wrote:
>Has anyone done a large GUI app with Python and TKinter? So far I have
>found that:
>1. TKinter is faster (more responsive) than Java's Swing library
>2. Tkinter apps use less memory than a similar sized Swing app
>3. I find Tkinter is easier to work with than Swing
>
>Does Tkinter's performance slow down when an app gets large enough?
Yes and no (of course). The underlying Tk to Tkinter if very
efficient; I've see 100,000 line Tk programs running in 8M virtual
under Linux, which is pretty amazing for an interpreted language.
> So far,
>I am thinking building my client's GUI's in TKinter and Python is the way to
>go, and to use Java on the backend where needed. I know that Java has never
>been a real good candidate for the client side apps, but now even with
>trying my apps on the new JDK 1.4 Beta which is supposed to handle Swing
>more efficiently, there doesn't seem to be any noticeable difference, and
>the JDK is now 48 meg in size!
>Any advice on medium to large Tkinter apps? Problems, issues?
You have an alternative with Tkinter if you find your application is
getting too memory consuming. As a rule, a lot of UI code is modular
and self contained, so if you don't mind mixing languages, you can
code self-contained UI portions directly inTk, and call them from
Tkinter. You'll be able the Python overhead on the Tk code that
is never used by Tkinter.
Mike.
More information about the Python-list
mailing list