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

U

ulysses

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
 
A

Andrei

ulysses said:
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.

All GUIs tend to have a certain overhead. A fairly typical wxPy program
will be (at startup) around 20 MB, but something really big like Boa
gets to about 35 MB and something smallish can be around 15 MB. I don't
find this unacceptable on reasonably modern systems. Other apps are
roughly in the same range: Word, MSIE, Mozilla Thunderbird, Opera and
Delphi are around 20 MB and people can keep those open at all times too.
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.

Happens with all apps on Windows: if you minimize them, the memory use
in the task manager drops.
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.

You should look into wxTaskBarIcon. wxPy questions are probably best
asked on the wxPython list.

--
Yours,

Andrei

=====
Mail address in header catches spam. Real contact info (decode with rot13):
(e-mail address removed). Fcnz-serr! Cyrnfr qb abg hfr va choyvp cbfgf. V
ernq gur yvfg, fb gurer'f ab arrq gb PP.
 
W

Werner Schiendl

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
 
U

ulysses

hi, Mr.Werner Schiendl

You are right. When I start my program ,it's use 10MB memory. then
I minimize it to taskbar, memory use is 3MB. But I notice total memory
usage did't reduce anymore. I shutdown my program I notice the total
memory really reduce.

OMG. I fooled by windows task manager. You are really smart guy.
I'm a windows programmer before (delphi,vb,vfp MIS).
I never know it . How can I find more information for windows memeroy .
which book your recommended.thanks.

Ulysses
 
W

Werner Schiendl

Hi

ulysses wrote:
-- snip --
OMG. I fooled by windows task manager. You are really smart guy.
I'm a windows programmer before (delphi,vb,vfp MIS).
I never know it . How can I find more information for windows memeroy .
which book your recommended.thanks.

Ulysses

Unfortunately I have no good book recommendations handy :-(

I'd recommend you try this question on a Win32 specific group.


regards

Werner
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,733
Messages
2,569,439
Members
44,829
Latest member
PIXThurman

Latest Threads

Top