#5532 HIGH Update.: Sugar shell consuming vast amounts of memory

Zarro Boogs per Child bugtracker at laptop.org
Wed Jan 9 09:03:45 EST 2008


#5532: Sugar shell consuming vast amounts of memory
-----------------------+----------------------------------------------------
  Reporter:  kimquirk  |       Owner:  tomeu   
      Type:  defect    |      Status:  new     
  Priority:  high      |   Milestone:  Update.1
 Component:  sugar     |     Version:          
Resolution:            |    Keywords:          
  Verified:  0         |    Blocking:          
 Blockedby:            |  
-----------------------+----------------------------------------------------

Comment(by marco):

 Replying to [comment:16 tomeu]:
 > > {{{
 > > +            shell_model = self._shell.get_model()
 > > }}}
 > >
 > > We are doing this in so many places... I think we should store the
 model in an instance variable.
 >
 > If the problem you see is duplicated code, then I would prefer to add
 the auxiliary methods _get_shell_model() and _get_home_model() to
 BuddyMenu instead of adding more references. In my opinion, those classes
 should be singletons and accessible from any class in the shell code.

 Sounds like a good idea to me.

 > > {{{
 > >          self._layout.remove(icon)
 > >          del self._activities[activity_model.get_id()]
 > > +        icon.destroy()
 > > }}}
 > >
 > > I think destroyed items are removed automatically, so the remove would
 be unnecessary, can you verify please?
 >
 > If we don't do self._layout.remove(icon), we still leak. By reading the
 code, looks like CanvasBox listens for 'destroy' in its children, but
 SpreadLayout doesn't, so this is needed for the moment.
 >

 Hmmm we will have to look into it at some point, but for now it's fine.

 > Any idea how to reduce the false positives? Looks like pylint cannot
 resolve the inheritance from sugar classes to GObjects.

 afaik the only way is to disable those errors in the pylint config.
 Obviously that's going to hide some real errors though :(

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



More information about the Bugs mailing list