[Bugs] #3778 TypingTurtle UNSP: Load images when they are needed

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Thu Aug 2 11:41:56 EDT 2012


#3778: Load images when they are needed
------------------------------------------+---------------------------------
    Reporter:  humitos                    |          Owner:  humitos                    
        Type:  enhancement                |         Status:  new                        
    Priority:  Unspecified by Maintainer  |      Milestone:  Unspecified by Release Team
   Component:  TypingTurtle               |        Version:  Unspecified                
    Severity:  Unspecified                |       Keywords:                             
Distribution:  Unspecified                |   Status_field:  Unconfirmed                
------------------------------------------+---------------------------------
 Typing Turtle is loading all the SVG images (62 images) at startup. This
 makes the activity to spend some time at the beggining and to consume to
 much memory.

 I think it should load the SVG images at the moment they are needed by the
 activity.

 This is the chunk of code (keyboard.py L#138) that is doing this work:
 {{{
 for filename in glob.iglob('images/OLPC*.svg'):
     image = GdkPixbuf.Pixbuf.new_from_file_at_scale(
         filename, scale_width, self.height, False)
     name = os.path.basename(filename)
     self.images[name] = image
 }}}

-- 
Ticket URL: <http://bugs.sugarlabs.org/ticket/3778>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list