Stability and Memory Pressure in 8.2
Marco Pesenti Gritti
mpgritti at gmail.com
Tue Sep 9 19:15:53 EDT 2008
I played some with python -v and got some more data about shell memory
usage at startup, after taking out gst and numpy.
6.7mb are taken by the following modules, which I don't think we can
get rid of in any way:
import os # precompiled from /usr/lib/python2.5/os.pyc
import gettext # precompiled from /usr/lib/python2.5/gettext.pyc
import gtk # directory /usr/lib/python2.5/site-packages/gtk-2.0/gtk
import gobject # directory
import ConfigParser # precompiled from /usr/lib/python2.5/ConfigParser.pyc
import wnck # dynamically loaded from
import dbus # directory /usr/lib/python2.5/site-packages/dbus
import telepathy # directory
import hippo # dynamically loaded from
import rsvg # dynamically loaded from
If I remove all the sugar code (both shell and toolkit) from the
complete list of imports we go up to 7.6mb
Total memory usage for the running shell is 16.8mb. I think runtime is
around +1mb compared to import only. (I should verify import only
though, to be sure).
So if I my measurements are correct and I'm not missing something:
* There is little to gain by trying to strip down dependencies
further, we have a margin of only 0.9mb.
* Importing all the Sugar code takes 8mb. ~5mb of these seem to be
triggered by the font size computations in sugar.graphics.style. I
suspect that either this memory will be allocated later lazily when
starting to render font or it will be freed by the gc (probably a bit
of both). But we should verify that code carefully and eventually
figure out why the fonts would be using all of this private memory.
More information about the Devel