#8431 NORM Opportu: Invoke python with -OO to save memory

Zarro Boogs per Child bugtracker at laptop.org
Fri Sep 12 00:38:03 EDT 2008


#8431: Invoke python with -OO to save memory
-------------------------+--------------------------------------------------
   Reporter:  cscott     |       Owner:  cscott                           
       Type:  defect     |      Status:  new                              
   Priority:  normal     |   Milestone:  Opportunity                      
  Component:  sugar      |     Version:  Development build as of this date
 Resolution:             |    Keywords:                                   
Next_action:  never set  |    Verified:  0                                
  Blockedby:  8438       |    Blocking:                                   
-------------------------+--------------------------------------------------

Comment(by cscott):

 With the patch for #8438, I've edited /usr/bin/sugar-shell to change the
 first line to {{{#!/usr/bin/python2.5 -OO}}} and run without any obvious
 problems.

 For speed I also generated .pyo files as follows:
 {{{
 $ python2.5 -OO
 >>> import compileall
 >>> compileall.compile_path()
 >>> compileall.compile_dir('/usr/share/sugar/shell')
 }}}

 I haven't determined how much extra space the .pyo files add to the image,
 but in devel@ it was suggested that we generate .pyo files *instead* of
 .pyc files -- so the net result should be a savings in NAND space.

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


More information about the Bugs mailing list