[PY GUI] interest function in python GUI(wxpython, pyqt) program.wxpython, pyqt

Werner Schiendl n17999950.temp.werner at neverbox.com
Tue Oct 21 07:35:47 EDT 2003


Hi,

you cannot reduce the memory consumption of a program by minimizing it 
to the taskbar (at least not in general).

When you are interested in the memory usage of your program, don't get 
fooled by the Windows Task Manager. The column "Mem Usage" displays the 
current amount of *physical* memory used by each thread. It drops 
because Windows does swap out memory pages of background applications 
(i. e. minimized) more aggressively than for the foreground application 
(this among other optimizations is known as "foreground application 
boost" and can even be configured).

To get an idea of how many memory your application really uses 
(including currently swapped out pages) see the column "VM Size". "Peak 
Mem Usage" is also sometimes interesting to monitor.

These one will not change when you minimize your application to the tray 
or taskbar.

You can select the columns from the Menu "View->Select Columns..." in 
the menu (it is only available when you are at the "Processes" tab).


If you need something *really* small in terms of memory footprint, you'd 
better of having the GUI as a separate application that you only start 
when you need it and which then communicates with the service running 
invisible (or in a "DOS" window).

However, I think the figures you mention need not really concern you if 
you want your application be run on current PC hardware.

hth
Werner



ulysses wrote:

> hi,
> 
> I'm working in python 5 months. I think it's very cool language.
> I do a p2p python program GUI. 
> First I make a software by wxpython. But I find wxpython use many many
> memory. 
> Second I use PYQT. But memory use still big. 
> But but but when I minimize the windows to taskbar, a fantasy
> something
> happened. memory use very very low when windows minimize.
> 
> So I test it in wxPython. It's same as pyqt. Before I minimize windows
> to tray, and hide main windows.  This way I just minimize to
> taskbar,don't
> hide to tray. memory use very low. 
> 
> I don't know how to program wxpython software can hide to tray and get
> lower memory use.although current computer's memory very big.
> 
> Ulysses





More information about the Python-list mailing list