[ZODB-Dev] Freeing Memory

Chris Withers chrisw@nipltd.com
Mon, 17 Sep 2001 13:16:49 +0100


Hi,

After I've done a get_transaction().commit(), how can I get a FileStorage to
free the entire contents of its Object Cache and get python to free up as much
memory as possible?

I've tried calling zodb.pack(time()), zodb.cacheMinimize(0), and gc.collect()
(which returned 0) but none seem to make a dent on the memory the python process
is consuming. Well, zodb.pack(time()) did but that is so slow, surely there must
be a better way.

I'm trying to index 30,000 documents by indexing them in batches of 1000 and
then commit()'ing. Sadly, during the commit of the second batch, my machine runs
out of memory :-(

Any help with this, or finding out whats' sucking up so much memory would be
very gratefully received...

cheers,

Chris