#4559 NORM Never A: datastore wakes up 400 times per second

Zarro Boogs per Child bugtracker at laptop.org
Wed Oct 31 08:08:18 EDT 2007


#4559: datastore wakes up 400 times per second
-----------------------+----------------------------------------------------
 Reporter:  smcv       |       Owner:  tomeu         
     Type:  defect     |      Status:  new           
 Priority:  normal     |   Milestone:  Never Assigned
Component:  datastore  |     Version:                
 Keywords:             |    Verified:  0             
-----------------------+----------------------------------------------------
 This is not how you're meant to use a main loop. I'm not sure exactly
 what's going wrong here, but there must be a better solution.

 {{{
 08:37 < tomeu> smcv: does this comment make sense to you:

   65 def main():
   66     # XXX: The context/sleep loop is a work around for what seems
   67     # to be the mainloop blocking in such a way that the indexer
   68     # thread doesn't run until new dbus messages come in...
   69     # I intend to track this down post trial-2
   70     # really awful
   71     import time
   72     context = mainloop.get_context()
   73
   74     if '-m' in sys.argv:
   75         # mount automatically for local testing
   76         ds.mount(repo_dir)
   77         ds.complete_indexing()
   78
   79     try:
   80         while connected:
   81             context.iteration(False)
   82             time.sleep(0.0025)

 08:38 < tomeu> smcv: we don't have an indexer thread any more, but we are
 still
                walking the files in usb sticks for constructing the
 metadata db
                in a worker thread
 08:39 < tomeu> I could take that thread out and move to use idle events,
 but
                wonder if that would be justified for Update.1
 }}}

-- 
Ticket URL: <https://dev.laptop.org/ticket/4559>
One Laptop Per Child <https://dev.laptop.org>
OLPC bug tracking system



More information about the Bugs mailing list