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
This commit is contained in:
John (J5) Palmieri 2007-08-22 17:37:33 -04:00
parent eb328e605c
commit 0a18473ca7

View File

@ -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)