#2773 HIGH Trial-3: Some sugar modules are running code on import causing hard to debug performance issues

Zarro Boogs per Child bugtracker at laptop.org
Tue Aug 14 09:32:25 EDT 2007


#2773: Some sugar modules are running code on import causing hard to debug
performance issues
---------------------+------------------------------------------------------
  Reporter:  J5      |       Owner:  tomeu  
      Type:  defect  |      Status:  new    
  Priority:  high    |   Milestone:  Trial-3
 Component:  sugar   |     Version:         
Resolution:          |    Keywords:  review+
  Verified:  0       |  
---------------------+------------------------------------------------------
Comment (by marco):

 smcv,

 there are objects in our public API which are basically just wrappers of a
 DBus service. The way we are doing it right now is:

 {{{
     def __init__(self):
         gobject.GObject.__init__(self)

         bus = dbus.SessionBus()
         bus_object = bus.get_object(_ACTIVITY_REGISTRY_SERVICE_NAME,
                                     _ACTIVITY_REGISTRY_PATH)
         self._registry = dbus.Interface(bus_object,
 _ACTIVITY_REGISTRY_IFACE)
         self._registry.connect_to_signal('ActivityAdded',
 self._activity_added_cb)

 }}}

 And then the object methods use self._registry.

 Is this the correct approach? Will it continue to work even if the service
 crash or is stopped or crashed (and then gets auto-reactivated?).

-- 
Ticket URL: <https://dev.laptop.org/ticket/2773#comment:10>
One Laptop Per Child <http://laptop.org/>



More information about the Bugs mailing list