[sugar] python activities startup
Benjamin M. Schwartz
Wed Feb 6 09:31:02 EST 2008
-----BEGIN PGP SIGNED MESSAGE-----
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.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the Sugar-devel