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

Zarro Boogs per Child bugtracker at laptop.org
Sat Aug 25 13:06:23 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       |  
---------------------+------------------------------------------------------
Comment (by tomeu):

 Replying to [comment:8 J5]:
 > Hiding complexity is a poor reason for not adding the async operations.
 The public API is still backwards compatible and some people may wish to
 use async calls for all D-Bus calls.  It is a good habit to get into
 actually.

 Can you explain why is a good habit to use always async calls?

 > Letting people know this is a network operation and could block, even if
 it is unlikely, makes sure programmers can make informed decisions.

 I totally agree with calling asynchronously methods that involve any
 access to the network. get_activities doesn't, and I'm not sure if
 get_buddies invokes operations across the network or just hands cached
 info.

 >Also as you see using the async API isn't all that complex.

 Well, we have to maintain more than twice the amount of code in the
 wrappers. I'm just asking what concrete benefits we gain by doing this. If
 all calls in the wrappers had an async variant, we would have to maintain
 a lot more of code.

 > There is a big problem with this though since the python profiler needs
 to execute the command it is profiling instead of giving me the ability to
 start and stop the profiler at whim.

 Any reason why you don't use the hotshot profiler for this?

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



More information about the Bugs mailing list