Memory usage problems with imports and python

A

arobinson

I am a developer relatively new to python and brand new to pygtk
development. I wanted to write a bloglines tray icon notifier for my
linux box. Everything is working quite well functionality wise, but
the memory footprint is horrible.

This little tray icon that simply has a thread for updates, a
gtk.StatusIcon, a few relatively small dict objects and a context menu
is running at around 20-25 MB of memory.

Doing some initial research, starting python up takes 1 MB, importing
GTK bumps it up to 4 MB, importing other libraries jumps up to 7 MB
and so on. IMO this code should take up a maximum of 2-4 MB (based on
other linux tray icons and docking programs).

Is this a problem with (a) python, (b) poor memory management of the
python libraries I am using, especially py/gtk or (c) something I am
doing wrong as a developer?

For anyone who wants to help, the code is open source and can be
viewed here:

http://pybloglines.svn.sourceforge.net/viewvc/pybloglines/

The "PyBloglinesNotifier" file is the main python program and imports
code from within the bloglines folder.

Thank you,
Andrew
 

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

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top