[sugar] status of startup speedup

Tomeu Vizoso tomeu
Fri Feb 8 18:08:54 EST 2008

On Fri, 2008-02-08 at 14:23 -0500, Michael Stone wrote:
> Tomeu,
> > The only remaining issue is that activities cannot update their journal
> > entries. They are able to create the entries in the datastore, but the
> > second call to the DS service fails. 
> Please publish the traceback so that I can help you debug the situation.

Well, it just times out and the message doesn't arrive to the DS
service. But I'll reproduce and attach the traceback tomorrow.

> Next, some notes and some questions about your patch:

I guess I was not clear on this, but this patch is not something I would
ask to be applied to upstream rainbow. I just intended to experiment
with the idea of a launcher process and see which improvements and
problems we would find.

> * In the second hunk, I'd like to replace the big os.environ block with
>   something like:
>     for key in (...):
>         os.environ[key] = env[key]
>   That being said, is there a good reason for selectively using values from
>   os.environ instead of using everything?

No, I just wanted to know which env vars were really needed. We can add
all of those if you think it's better.

> * By convention, the first argument to log() should be a format string.
> * I think your patch breaks rainbow's strace support. Strace support can
>   probably be fixed by forking a second time, then instructing strace to trace
>   to the pid of the parent; however, this will lead to interleaved writes to
>   the shared file descriptors.
> * Why is it necessary to import gtk twice?

Well, we import first in the parent process so the initialization is
inherited by all children. The second time is just because we need to
reopen the connection to X (and need a gtk name in that scope).

> * I am extremely uncomfortable importing all of telepathy, sugar, dbus, and gtk
>   into the main rainbow process before it has dropped privilege. Unfortunately,
>   we must drop privilege after forking and the imports must be done before
>   forking. (Also, unfortunately, all of sugar, telepathy, and the datastore
>   have root access through sudo. I'll be trying to change this in coming
>   weeks.)

Of course. I guess we could have a launcher process that does the
preloading of expensive modules and then fork?

> * Rainbow is currently made available under the MIT license. You offered your
>   sugaractivity.py file under the GPL2+ license. Are you willing to offer it
>   under the MIT license?

That's not my code, it is mostly Marco's. I don't have any problem with
having my work as MIT.

> Anyhow, thanks very much for your hard work,

Thanks for your help.


More information about the Sugar-devel mailing list