Message10015
Logged In: YES
user_id=21627
Also, when parsing the large xml file: if you invoke
gc.collect() after each iteration, memory consumption will
go down, and not grow over time. The reason that GC does not
trigger automatically is that you allocate all the space
through strings. GC will be invoked after 1000 new container
objects have been allocated, but you exhaust the memory
before that - so either set the GC threshold down, or invoke
GC on your own.
For the specific application, it would be sufficient if
xml.sax.__init__.parse would invoke
parser.setContentHandler(None) after parsing has completed;
this should already break the cycle.
To solve the general problem, I like your suggestion of
using a separate locator. |
|
Date |
User |
Action |
Args |
2007-08-23 14:00:09 | admin | link | issue535474 messages |
2007-08-23 14:00:09 | admin | create | |
|