#7667 NORM 9.1.0: Sugar Control Panel startup too slow

Zarro Boogs per Child bugtracker at laptop.org
Tue Sep 23 02:48:58 EDT 2008


#7667: Sugar Control Panel startup too slow
-------------------------+--------------------------------------------------
   Reporter:  sayamindu  |       Owner:  erikos                           
       Type:  defect     |      Status:  new                              
   Priority:  normal     |   Milestone:  9.1.0                            
  Component:  sugar      |     Version:  Development build as of this date
 Resolution:             |    Keywords:  performance                      
Next_action:  diagnose   |    Verified:  0                                
  Blockedby:             |    Blocking:                                   
-------------------------+--------------------------------------------------
Changes (by erikos):

 * cc: cscott (added)


Comment:

 Timing showed that the importing of the modules is slow. Two are
 especially costly, the language one and the updater. The language module
 generates the doc string to be used by the command line interface on
 startup This loop is costly:
 http://dev.laptop.org/git?p=sugar;a=blob;f=src/controlpanel/model/language.py;h=404d9dda373c9ddd1ab159fb7d2d2d1e6c80fc99;hb=22b196f2e740011964edaac837c10a325f156c98#l35

 Replacing the 'str.find()' calls with the 'x in string' already speeds it
 up. Actually I think there should be a better way to get the locales than
 parsing the output of 'locale -av'. In the future I want the languages to
 be country specific - (English, Deutsch, Francais...) so this must change
 anyway.

 @scott: can you debug a bit the updater which parts of the code can be
 improved here? For example this is not needed anymore.
 http://dev.laptop.org/git?p=users/cscott/sugar-update-
 control;a=blob;f=view/updater.py;h=7a1766d2ca20c9322890b0d05b332e0035b7ff34;hb=76fdf59f0923a7e2cee3625825dfd86dbe206661#l30

 In general I wonder if we have another option than importing all the
 modules at startup. We just want some info to be able to display the icons
 for each of them.
 {{{
 model:
 KEYWORDS = ['network', 'jabber', 'radio', 'server']

 view:
 CLASS = 'Network'
 ICON = 'module-network'
 TITLE = _('Network')
 }}}

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


More information about the Bugs mailing list