exe application over 40mb

Hi,
I've noticed that once I've compiled with py2exe my wxPython application the memory usage takes over than 40mb!
I'm using
from wxPython.wx import *

in all the py pages, is this the reason? so i should import only necessary modules, or is there another answer to this?

thanks

Alessandro Crugnola [aka] sephiroth
Flash | PHP Developer
http://www.sephiroth.it

Team Macromedia Volunteer for Flash
http://www.macromedia.com/go/team

Alessandro Crugnola *sephiroth* wrote:

Hi,
I've noticed that once I've compiled with py2exe my wxPython application the memory usage takes over than 40mb!
I'm using from wxPython.wx import *

in all the py pages, is this the reason? so i should import only necessary modules, or is there another answer to this?

How much does it take before py2exe?

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

How much does it take before py2exe?

the same, always over 40mb (ususally 47mb without any document opened)

wishmaster@sephiroth.it wrote:

How much does it take before py2exe?

the same, always over 40mb (ususally 47mb without any document opened)

Give us a directory listing. As an example here is mine for BitPim
which is a 10MB py2exe (~5MB as an installer). The resources subdirectory
contains another 2MB of help files, images etc. I use quite a number
of the wx modules (calendar, grid, treelist, help, help, stc):

09/09/2003 03:18 PM 437 bitpim.css
11/25/2003 02:03 AM 889,043 bitpim.exe
08/20/2003 01:26 PM 655 bitpim.exe.manifest
10/01/2003 12:40 PM 61,440 calendarc.pyd
10/02/2003 08:03 PM 45,116 datetime.pyd
10/01/2003 12:40 PM 286,720 gizmosc.pyd
10/01/2003 12:40 PM 299,008 gridc.pyd
10/01/2003 12:40 PM 36,864 helpc.pyd
10/01/2003 12:40 PM 196,608 htmlc.pyd
10/02/2003 08:03 PM 45,114 parser.pyd
10/02/2003 08:02 PM 974,908 python23.dll
09/02/2003 11:01 AM 86,084 PyWinTypes23.dll
11/25/2003 02:03 AM <DIR> resources
10/02/2003 08:04 PM 20,538 select.pyd
10/01/2003 12:40 PM 589,824 stc_c.pyd
09/02/2003 11:01 AM 61,497 win32api.pyd
09/02/2003 11:01 AM 28,731 win32event.pyd
09/02/2003 11:01 AM 73,786 win32file.pyd
10/01/2003 12:40 PM 2,240,512 wxc.pyd
10/01/2003 10:43 AM 3,239,936 wxmsw24h.dll
10/02/2003 08:04 PM 61,496 zlib.pyd
10/02/2003 08:02 PM 49,211 _socket.pyd
10/02/2003 08:03 PM 57,400 _sre.pyd
10/02/2003 08:03 PM 495,616 _ssl.pyd
10/02/2003 08:04 PM 36,864 _winreg.pyd
              24 File(s) 9,877,408 bytes

Roger

I have the same question. A directory listing of one of my tiny apps (a frame with a menu and a couple buttons) is as follows:

11/11/2003 05:42p 110,592 <mydll>.dll
11/11/2003 05:43p 94,208 <mydllwrapper>.pyd
30/05/2003 06:12p 847,920 python22.dll
13/11/2003 02:23p 414,112 <my_application>.exe
22/01/2003 09:38p 2,179,072 wxc.pyd
22/01/2003 08:13p 3,186,688 wxmsw240h.dll
27/06/2003 04:13a 61,440 _ctypes.pyd
30/05/2003 06:13p 53,292 _sre.pyd

It is a simple wxPython application run through py2exe, and when fired up consumes 12MB of memory. Seems like a heck of a lot for the original file sizes and what it is actually doing.

Is this normal?

BTW - I am only importing the modules I need from wxPython in the non-gui-centric files, and I do a "from wxPython.wx import *" in the GUI file, as it was generated by wxGlade.

Thanks,
mark.

···

On Tue, 25 Nov 2003 02:06:21 -0800, Roger Binns <rogerb@rogerbinns.com> wrote:

wishmaster@sephiroth.it wrote:

How much does it take before py2exe?

the same, always over 40mb (ususally 47mb without any document opened)

Give us a directory listing. As an example here is mine for BitPim
which is a 10MB py2exe (~5MB as an installer). The resources subdirectory
contains another 2MB of help files, images etc. I use quite a number
of the wx modules (calendar, grid, treelist, help, help, stc):

09/09/2003 03:18 PM 437 bitpim.css
11/25/2003 02:03 AM 889,043 bitpim.exe
08/20/2003 01:26 PM 655 bitpim.exe.manifest
10/01/2003 12:40 PM 61,440 calendarc.pyd
10/02/2003 08:03 PM 45,116 datetime.pyd
10/01/2003 12:40 PM 286,720 gizmosc.pyd
10/01/2003 12:40 PM 299,008 gridc.pyd
10/01/2003 12:40 PM 36,864 helpc.pyd
10/01/2003 12:40 PM 196,608 htmlc.pyd
10/02/2003 08:03 PM 45,114 parser.pyd
10/02/2003 08:02 PM 974,908 python23.dll
09/02/2003 11:01 AM 86,084 PyWinTypes23.dll
11/25/2003 02:03 AM <DIR> resources
10/02/2003 08:04 PM 20,538 select.pyd
10/01/2003 12:40 PM 589,824 stc_c.pyd
09/02/2003 11:01 AM 61,497 win32api.pyd
09/02/2003 11:01 AM 28,731 win32event.pyd
09/02/2003 11:01 AM 73,786 win32file.pyd
10/01/2003 12:40 PM 2,240,512 wxc.pyd
10/01/2003 10:43 AM 3,239,936 wxmsw24h.dll
10/02/2003 08:04 PM 61,496 zlib.pyd
10/02/2003 08:02 PM 49,211 _socket.pyd
10/02/2003 08:03 PM 57,400 _sre.pyd
10/02/2003 08:03 PM 495,616 _ssl.pyd
10/02/2003 08:04 PM 36,864 _winreg.pyd
              24 File(s) 9,877,408 bytes

Roger

Sorry, I didn't mean Mb in application size, but in memory usage..
but i found that disabling one if the tree ctrl im using the meory usage it's less than 20Mb!
I think i found the memory leak problem.
thanks

:: -----Original Message-----
:: From: Roger Binns [mailto:rogerb@rogerbinns.com]
:: Sent: martedì 25 novembre 2003 11.06
:: To: wxPython-users@lists.wxwindows.org
:: Subject: Re: [wxPython-users] exe application over 40mb
::

···

:: wishmaster@sephiroth.it wrote:
:: >> How much does it take before py2exe?
:: >>
:: >
:: > the same, always over 40mb (ususally 47mb without any
:: document opened)
::
:: Give us a directory listing. As an example here is mine for
:: BitPim which is a 10MB py2exe (~5MB as an installer). The
:: resources subdirectory contains another 2MB of help files,
:: images etc. I use quite a number of the wx modules
:: (calendar, grid, treelist, help, help, stc):
::
:: 09/09/2003 03:18 PM 437 bitpim.css
:: 11/25/2003 02:03 AM 889,043 bitpim.exe
:: 08/20/2003 01:26 PM 655 bitpim.exe.manifest
:: 10/01/2003 12:40 PM 61,440 calendarc.pyd
:: 10/02/2003 08:03 PM 45,116 datetime.pyd
:: 10/01/2003 12:40 PM 286,720 gizmosc.pyd
:: 10/01/2003 12:40 PM 299,008 gridc.pyd
:: 10/01/2003 12:40 PM 36,864 helpc.pyd
:: 10/01/2003 12:40 PM 196,608 htmlc.pyd
:: 10/02/2003 08:03 PM 45,114 parser.pyd
:: 10/02/2003 08:02 PM 974,908 python23.dll
:: 09/02/2003 11:01 AM 86,084 PyWinTypes23.dll
:: 11/25/2003 02:03 AM <DIR> resources
:: 10/02/2003 08:04 PM 20,538 select.pyd
:: 10/01/2003 12:40 PM 589,824 stc_c.pyd
:: 09/02/2003 11:01 AM 61,497 win32api.pyd
:: 09/02/2003 11:01 AM 28,731 win32event.pyd
:: 09/02/2003 11:01 AM 73,786 win32file.pyd
:: 10/01/2003 12:40 PM 2,240,512 wxc.pyd
:: 10/01/2003 10:43 AM 3,239,936 wxmsw24h.dll
:: 10/02/2003 08:04 PM 61,496 zlib.pyd
:: 10/02/2003 08:02 PM 49,211 _socket.pyd
:: 10/02/2003 08:03 PM 57,400 _sre.pyd
:: 10/02/2003 08:03 PM 495,616 _ssl.pyd
:: 10/02/2003 08:04 PM 36,864 _winreg.pyd
:: 24 File(s) 9,877,408 bytes
::
:: Roger
::
:: ---------------------------------------------------------------------
:: To unsubscribe, e-mail:
:: wxPython-users-unsubscribe@lists.wxwindows.org
:: For additional commands, e-mail:
:: wxPython-users-help@lists.wxwindows.org
::

[Mark]

[...] a simple wxPython application run through py2exe, and when fired up
consumes 12MB of memory. Seems like a heck of a lot for the original file
sizes and what it is actually doing.

FWIW, notepad.exe is 65K and shows up as using 2.9MB. Unless you're
seeing measurable performance problems, I wouldn't worry about the
reported memory usage.

If you're worried about performance on machines with less memory than
yours and you're running NT/2000/XP, you can limit the amount of physical
memory available to the OS using the /MAXMEM switch in boot.ini - see
http://www.sysinternals.com/ntw2k/info/bootini.shtml I don't know whether
that's possible for 9x.

···

--
Richie Hindle
richie@entrian.com