[sugar] Removing docstrings
Tomeu Vizoso
tomeu at tomeuvizoso.net
Wed Aug 27 13:34:53 EDT 2008
On Tue, Aug 26, 2008 at 1:08 AM, C. Scott Ananian <cscott at laptop.org> wrote:
> A previous message (can't find it now to respond to it, sorry)
> indicated that static docstrings were responsible for a significant
> amount of sugar's runtime memory requirements.
Some preliminary results:
After precompiling .py files into .pyo with -OO (.pyo files don't
contain docstrings):
...
3.0 MiB + 277.5 KiB = 3.3
MiB /usr/bin/python2.5/usr/sbin/olpc-update-query--auto-s10
3.1 MiB + 311.0 KiB = 3.4
MiB /usr/bin/python2.5-OO/usr/bin/sugar-shell-service
4.0 MiB + 23.0 KiB = 4.0 MiB oatc /init
4.7 MiB + 381.0 KiB = 5.1
MiB /usr/bin/python2.5-OO/usr/bin/sugar-presence-service
5.7 MiB + 480.5 KiB = 6.2
MiB /usr/bin/python2.5-OO/usr/bin/datastore-service
11.3 MiB + 2.1 MiB = 13.4 MiB /usr/bin/python2.5-OO/usr/sbin/rainbow-daemon
12.1 MiB + 2.8 MiB = 14.9
MiB /usr/bin/python2.5-OO/usr/bin/sugar-activityjournalactivi
23.6 MiB + 3.1 MiB = 26.7 MiB /usr/bin/python2.5-OO/usr/bin/sugar-shell
---------------------------------
103.0 MiB
=================================
Private + Shared = RAM used Program
[olpc at xo-0C-D0-FF ~]$ free
total used free shared buffers cached
Mem: 235756 214576 21180 0 0 80040
-/+ buffers/cache: 134536 101220
Swap: 0 0 0
Normal build:
...
3.3 MiB + 333.0 KiB = 3.6 MiB python/usr/bin/sugar-shell-service
4.0 MiB + 23.0 KiB = 4.0 MiB oatc /init
5.1 MiB + 418.5 KiB = 5.5 MiB python/usr/bin/sugar-presence-service
6.3 MiB + 527.5 KiB = 6.8 MiB python/usr/bin/datastore-service
12.8 MiB + 2.1 MiB = 14.9 MiB python/usr/sbin/rainbow-daemon
12.5 MiB + 2.8 MiB = 15.3
MiB python/usr/bin/sugar-activityjournalactivity.JournalActivi
26.6 MiB + 3.0 MiB = 29.6 MiB python/usr/bin/sugar-shell
---------------------------------
103.9 MiB
=================================
Private + Shared = RAM used Program
-bash-3.2# free
total used free shared buffers cached
Mem: 237756 210648 27108 0 0 99896
-/+ buffers/cache: 110752 127004
Swap: 0 0 0
Had to backport two patches for -OO to work:
https://bugzilla.redhat.com/show_bug.cgi?id=460334
As Scott wrote initially, we still need to dig a bit more in order to
see all the tradeoffs in play here.
Regards,
Tomeu
More information about the Sugar
mailing list