Memory usage problems with imports and python

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • arobinson

    Memory usage problems with imports and python

    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:

    Download python-bloglines-notifier for free. Bloglines notifier written in Python. It provides a status/tray icon that can show the unread count for each of your subscriptions as well as a list of the titles of the articles that are unread in the icon's tooltip.


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

    Thank you,
    Andrew
Working...