[wxPython-users] wxPython memory usage
Werner F. Bruhin
werner.bruhin at free.fr
Fri Feb 2 06:27:38 PST 2007
Hi Andrea,
Andrea Gavana wrote:
> Hi Dreas,
>
>> We have an in-house developed Python application using wxPython (running
>> on Windows). When launching our application, memory usage according to
>> TaskManager is around 35MB. When opening the GUI, memory increases to
>> around 50MB. When closing the GUI window, nothing changes. When
>> minimizing the GUI however, the memory usage drops to around 3MB! Can
>> anyone explain this? If there anything we can change so TaskManager will
>> report a lower amount of memory usage when our application is in the
>> tray?
>
> I won't trust Task Manager up to this point: all the Windows
> applications behave in this way: run it, you get 18 MB; iconize it,
> you get 3.5 MB; maximize it again, you get 7 MB. I am not an expert in
> this things, but you may want to take a look here:
>
> http://www.dataaccess.com/kbasepublic/KBPrint.asp?ArticleID=2141
>
> I don't know why Task Manager is designed in this way, but it would be
> nice to have a tool that shows you the real RAM usage whether the app
> is iconized or not (which shouldn't even matter).
I recently discovered Process Explorer from SysInternals (now ownded by
MS: http://www.microsoft.com/technet/sysinternals/default.mspx but still
free of charge, there other tools available from that site but have not
tried them) which gives more information, i.e. which dll is used by a
process and one can configure it as a Task Manager replacement.
Are the mem usage reports more accurate, I don't know. But a task
iconized which does not do anything, should in my view have a lower
memory usage - as it is probably/should be swapped to virtual memory (disk).
I have also noticed that calling python garbage collection does have
some influence.
My app uses on startup around 35MB "Working Set" and "Virtual Size" is
up around 90MB+, if a minimize it I see 5 - 6 MB etc etc, TaskManager
would keep reporting something around the 35MB and I could not see which
".pyd" or ".dll" file are in use.
Werner
More information about the wxpython-users
mailing list