#6472 NORM 8.2.0 (: datastore initialization should happen the activity has been brought up

Zarro Boogs per Child bugtracker at laptop.org
Sun Jul 6 21:38:43 EDT 2008


#6472: datastore initialization should happen the activity has been brought up
-------------------------+--------------------------------------------------
   Reporter:  tomeu      |       Owner:  tomeu               
       Type:  defect     |      Status:  new                 
   Priority:  normal     |   Milestone:  8.2.0 (was Update.2)
  Component:  sugar      |     Version:                      
 Resolution:             |    Keywords:  8.2.0:?             
Next_action:  never set  |    Verified:  0                   
  Blockedby:             |    Blocking:                      
-------------------------+--------------------------------------------------
Changes (by mtd):

 * cc: mtd (added)
  * next_action:  => never set


Comment:

 Attaching a straw man patch...this certainly improves Terminal's perceived
 startup time (by about >1.4 seconds it takes to write to the datastore).

 Before (note datastore object is created by activity.py before Terminal's
 __init__() says "Starting the Terminal activity"):

 {{{
 bash-3.2$ more ~/.sugar/default/logs/org.laptop.Terminal-4.log
 1215392301.740669 WARNING root: Activity directory lacks a MANIFEST file.
 1215392303.542658 DEBUG root: terminal.py: imports took 1.61535310745 secs
 1215392303.783406 DEBUG root: Creating a jobject.
 1215392303.797043 DEBUG root: datastore.write
 1215392303.904979 DEBUG root: dbus_helpers.create: d211e814-816b-471b-
 a95d-d1e971c2251f
 1215392303.907042 DEBUG root: Written object d211e814-816b-471b-a95d-
 d1e971c2251f to the datastore.
 1215392303.970035 DEBUG root: *** Act
 fa7b6b7574efaaad9924ae1cd307b789ea7a94c5, mesh instance None, scope
 private
 1215392303.972049 DEBUG root: Starting the Terminal activity
 1215392303.974206 DEBUG root: burned 0.00501704216003 secs before I tried
 to init
 1215392303.984277 DEBUG root: burned 0.42459487915 secs in activity.py's
 __init__
 1215392304.790131 WARNING root: No gtk.AccelGroup in the top level window.
 1215392304.861921 WARNING root: No gtk.AccelGroup in the top level window.
 ** (sugar-activity:3757): DEBUG: Got client ID
 "1023c02c4ebb456f2121539230641872000000031880003"
 ** (sugar-activity:3757): DEBUG: Setting initial properties
 ** (sugar-activity:3757): DEBUG: Received SaveYourself(SmSaveLocal,
 !Shutdown, SmInteractStyleNone, !Fast) in state idle
 ** (sugar-activity:3757): DEBUG: Sending SaveYourselfDone(True) for
 initial SaveYourself
 ** (sugar-activity:3757): DEBUG: Received SaveComplete message in state
 save-yourself-done
 }}}


 After (note datastore object is now created by activity.py *after*
 Terminal's __init__() says "Starting the Terminal activity"):
 {{{
 bash-3.2$ more ~/.sugar/default/logs/org.laptop.Terminal-1.log
 1215393792.080565 WARNING root: Activity directory lacks a MANIFEST file.
 1215393793.716737 DEBUG root: terminal.py: imports took 1.53287696838 secs
 1215393794.002742 DEBUG root: Starting the Terminal activity
 1215393794.004603 DEBUG root: burned 0.0048360824585 secs before I tried
 to init
 1215393794.006282 DEBUG root: burned 0.28128194809 secs in activity.py's
 __init__
 1215393794.434895 WARNING root: No gtk.AccelGroup in the top level window.
 1215393794.472340 WARNING root: No gtk.AccelGroup in the top level window.
 ** (sugar-activity:2798): DEBUG: Got client ID
 "109c1fd4bc94ef0f0f121539379517423900000026420001"
 ** (sugar-activity:2798): DEBUG: Setting initial properties
 1215393795.178198 DEBUG root: Creating a jobject.
 1215393795.185803 DEBUG root: datastore.write
 1215393795.611513 DEBUG root: dbus_helpers.create:
 8d4c92b5-6233-4b45-a238-dc3e6b404354
 1215393795.614680 DEBUG root: Written object
 8d4c92b5-6233-4b45-a238-dc3e6b404354 to the datastore.
 1215393795.622676 DEBUG root: *** Act
 5c6d5e2caf35703928221925f11e4fd4e305a480, mesh instance None, scope
 private
 ** (sugar-activity:2798): DEBUG: Received SaveYourself(SmSaveLocal,
 !Shutdown, SmInteractStyleNone, !Fast) in state idle
 ** (sugar-activity:2798): DEBUG: Sending SaveYourselfDone(True) for
 initial SaveYourself
 ** (sugar-activity:2798): DEBUG: Received SaveComplete message in state
 save-yourself-done
 }}}

-- 
Ticket URL: <http://dev.laptop.org/ticket/6472#comment:3>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system


More information about the Bugs mailing list