From 0a18473ca7683aac3dfc9964c78a005ac6ea141d Mon Sep 17 00:00:00 2001 From: John (J5) Palmieri Date: Wed, 22 Aug 2007 21:37:33 +0000 Subject: 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 --- 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) -- cgit v0.9.1