#8378 NORM 8.2.0 (: importing urllib uses 0.3mb of memory

Zarro Boogs per Child bugtracker at laptop.org
Sat Sep 13 03:24:08 EDT 2008


#8378: importing urllib uses 0.3mb of memory
----------------------+-----------------------------------------------------
   Reporter:  marco   |       Owner:  marco               
       Type:  defect  |      Status:  new                 
   Priority:  normal  |   Milestone:  8.2.0 (was Update.2)
  Component:  sugar   |     Version:  not specified       
 Resolution:          |    Keywords:                      
Next_action:  code    |    Verified:  0                   
  Blockedby:          |    Blocking:  7579                
----------------------+-----------------------------------------------------
Changes (by tomeu):

 * cc: tomeu (added)


Comment:

 In the longer term, we should submit patches upstream. urllib and urllib2
 (and other modules) compile a bunch of regular expressions at import time
 but aren't always used. This is very expensive in terms of memory usage
 and cpu time.

 I have seen other modules in the python standard library where regular
 expressions have been obviously moved to be compiled lazily, so I think
 our patches will be accepted without much problems.

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


More information about the Bugs mailing list