#3019 HIGH Trial-3: PATCH: Optimize get_activities by making it async

Zarro Boogs per Child bugtracker at laptop.org
Sat Aug 25 14:08:42 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       |  
---------------------+------------------------------------------------------
Changes (by tomeu):

  * keywords:  optimization review? => optimization review+

Comment:

 Replying to [comment:11 J5]:
 > The code in the wrappers is more complex for flexibility sake (though
 the whole thing is mostly boilerplate code) but the code in the clients
 simply break up the sync call into a callback.  All operations over D-Bus
 are by definition networked as they go over sockets.  There is no promise
 that a call will return in constant time and mostly depends on who is
 talking to the service at what time.  Making the calls async guards
 against this as well as guarding against possible changes to the remote
 method itself.  This is almost the same as the transition from top down
 programming to an event based model in GUI systems.  Sure it gets more
 complex but if you don't think about blocking issues you are going to end
 up with a program that performs non-optimally which is amplified even more
 by our processor.

 This and also the fact that our dbus services process one request at a
 time (so one slow call would block all the subsequent ones) has convinced
 me.

 > I'll try hotspot but the last time I used it loading the data it
 produced crashed python.  That was when we were based off of 2.4 and FC6
 though.

 Yeah, you have to make sure you stop the profiler before the process
 finishes. If you don't do so, the resulting file won't be readable. This
 can be a pain for dbus services, I had to set up a signal handler for
 SIGINT and close the profiler there.

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



More information about the Bugs mailing list