Someone using PyGtk
Jeff Shannon
jeff at ccvcorp.com
Wed Apr 3 13:30:30 EST 2002
In article <Xns91E4ADCD75B59RASXnewsDFE1 at 130.133.1.4>,
starx at pacbell.net says...
> Jeff Shannon || Tue 02 Apr 2002 01:55:39p:
>
> > Hm, wxPython seemed to perform adequately for me, on a (Win95)
> > P200 with only 64MB RAM.
>
> I use WX too, and it seems that you pretty much pay a fixed price for
> importing the modlue, no matter how much you need or how big your program
> is. I'd think most other frameworks would have the same problem, an easy
> way to tell would be something like:
>
> print "Loading wxPython...",
> from wxPython.wx import *
> print "done"
>
> ... I bet most of your execuation time for a hello world program would be
> between those prints.
Indeed, testing with this simple script:
from time import time
start = time()
from wxPython.wx import *
print "import took %f seconds" % (time() - start)
seems to indicate a 2 1/2 - 4 1/2 second import time on my (as
noted, extremely slow) machine. (Faster times happen when
repeated in quick succession, slower times after some time has
passed; I suspect caching and virtual memory paging to be the
significant variables.) This, added to the time to start the
Python interpreter, means that there is a significant startup
time for even a very simple wxPython program. But that startup
time increases fairly slowly with the complexity of the program.
And keep in mind that starting Notepad.exe, an optimized C
program that consists almost entirely of an OS-builtin control,
takes almost a second on this same machine, and any complex
application (such as Excel or Photoshop) can take 45 seconds to
a minute to load. Also keep in mind that slow startup time is
not necessarily correlated with poor responsiveness once the
application is running. Therefore, I would say that, unless
there are *serious* timing constraints, complaints about wxPython
being slow are on questionable ground. I'd consider algorithm
optimization to be a more fruitful area to work on, than worrying
about the toolkit.
(I'm sure that Philip is in agreement on this; I'm clarifying my
point for the O.P.'s benefit here.)
--
Jeff Shannon
Technician/Programmer
Credit International
More information about the Python-list
mailing list