[python-win32] win32 python module memory usage

Eric Ries eric.ries at aya.yale.edu
Wed Apr 27 19:49:48 CEST 2005

I have been receiving complaints from some of my users that my win32 python
app takes a lot of memory - before the program even starts doing anything.

By adding "pause" statements before loading modules, I've been able to
determine a little bit of what's going on. I'm curious where all this memory
is going and what I can do (if anything) to reduce it.

When my app starts up, before loading any modules, the memory footprint is
4MB. After all the standard python modules (including win32con, win32api,
etc) are loaded, the footprint is 9MB. By the time all my custom modules are
loaded and my app is showing a win32 "login" dialog - my app weighs in at a
whopping 32MB. That seems pretty high.

Any suggestions for ways to diagnose the usage and/or slim it down?

Thanks in advance,


More information about the Python-win32 mailing list