Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn (J5) Palmieri <johnp@redhat.com>2007-08-22 21:37:33 (GMT)
committer John (J5) Palmieri <johnp@redhat.com>2007-08-22 21:37:33 (GMT)
commit0a18473ca7683aac3dfc9964c78a005ac6ea141d (patch)
tree1e10af949eca6a2be1ce4d0a7d3c679cb6570a6d
parenteb328e605c5d0dd12b667af5869c6378419916b6 (diff)
Speed up startup by another 2 seconds by using follow_name_owner_changes
* this is a side effect of follow_name_owner_changes which removes some blocking calls in the __init__ of proxies. It introduces some semantics we might not want (such as following name owner changes) but which are fairly beinign
-rw-r--r--sugar/activity/registry.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/sugar/activity/registry.py b/sugar/activity/registry.py
index 1483a78..2f6b567 100644
--- a/sugar/activity/registry.py
+++ b/sugar/activity/registry.py
@@ -49,8 +49,14 @@ class ActivityRegistry(gobject.GObject):
gobject.GObject.__init__(self)
bus = dbus.SessionBus()
+
+ # FIXME: Is follow_name_owner_changes what we really want?
+ # It speeds up the start time by about 2 seconds
+ # but is really a side effect of starting a proxy
+ # in this state (i.e. we don't block in the constructor)
bus_object = bus.get_object(_ACTIVITY_REGISTRY_SERVICE_NAME,
- _ACTIVITY_REGISTRY_PATH)
+ _ACTIVITY_REGISTRY_PATH,
+ follow_name_owner_changes = True)
self._registry = dbus.Interface(bus_object, _ACTIVITY_REGISTRY_IFACE)
self._registry.connect_to_signal('ActivityAdded', self._activity_added_cb)