[sugar] python activities startup

Benjamin M. Schwartz bmschwar
Wed Feb 6 09:31:02 EST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tomeu Vizoso wrote:
> By the data in #5228, looks like more than 50% of time is spent
> importing modules. dbus, telepathy and pygtk make for more than 30% of
> _total_ startup time.

There has been much talk about fork()ing the python interpreter for each
activity instead of starting a new interpreter.  AFAIK, the python interpreter
only does nontrivial work the first time a module is imported in each
interpreter.  By this logic, if we use a forked interpreter and import these
modules at the root, it seems that the import will only have to happen once at
Sugar startup, rather than once for each Activity.

I would appreciate a comment on this from someone who knows more about the
relevant issues, like the interaction of CoW memory and python modules.

- --Ben
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHqcSmUJT6e6HFtqQRAsahAJsG4pa1WMFbBX+C/+z+KuCXxGuB8ACfXC05
PKkSUnLaK3iHeWgI4l5ZPks=
=Lx/w
-----END PGP SIGNATURE-----



More information about the Sugar-devel mailing list