[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] Reduce memory footprint
From:       "Jonathan Harper" <jon () white-walls ! net>
Date:       2010-12-23 18:22:15
Message-ID: 000401cba2ce$54c6f9c0$fe54ed40$ () net
[Download RAW message or body]

>I've written a small tool with a quite simple GUI using pyqt. After startup

>is completed the gui takes up 35mb memory, is there any way to reduce this
>footprint? Seems unneccesarily large.
Yes and no, but mostly no. There's a few overhead reducing features of
Python (__slots__) that will make some small amount of difference but aren't
worth the trouble. You could also be all picky-like and only import the
modules in QtCore and QtGui you absolutely need.

In the grand scheme of things, however, you're not going to crunch that 35mb
into 5mb or so. Reason one is that you're using Python, so the interpreter
is running along with its overhead. Reason two is that you're using Qt for
the GUI, so those shared libraries have to be loaded. Any blood sweat and
tears you expend to reduce your application's footprint is peanuts for a
small app.

-- Jon Harper

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic