#3019 HIGH Trial-3: PATCH: Optimize get_activities by making it async
Zarro Boogs per Child
bugtracker at laptop.org
Sat Aug 25 11:41:30 EDT 2007
#3019: PATCH: Optimize get_activities by making it async
---------------------+------------------------------------------------------
Reporter: J5 | Owner: tomeu
Type: defect | Status: new
Priority: high | Milestone: Trial-3
Component: sugar | Version:
Resolution: | Keywords: optimization review?
Verified: 0 |
---------------------+------------------------------------------------------
Comment (by tomeu):
Looks good in general, although I would prefer if the public API
(sugar.activity.registry and sugar.presenceservice) wasn't changed.
Those APIs are for being used by activities, so any added complexity
should be justified.
At least in the case of get_activities (I'm not so sure about get_buddies)
this method will be always fast, as is simply passing a list of activities
from one process to the other.
What is slowing the startup process is not the call to get_activities
itself, but the activation of the sugar-shell-service, which takes almost
all the time the shell is waiting (~1.3s).
So I would suggest to not alter the sugar API and just add what is needed
to ActivitiesBox for the call to be async.
Or, perhaps a better suggestion would be to do the call sync, although not
on the constructor of ActivitiesBox, but on an idle callback set up after
the widget has been realized. If this works, would add much less
complexity to the code and bring the same improvement that the present
patch.
Btw, importing dbus, dbus.glib and dbus.service takes half of the startup
time of a dbus service. Do you know if there's any easy fix for that?
--
Ticket URL: <https://dev.laptop.org/ticket/3019#comment:6>
One Laptop Per Child <http://laptop.org/>
More information about the Bugs
mailing list