[ZODB-Dev] experimenting with Standalone ZODB...

Casey Duncan c.duncan@nlada.org
Thu, 18 Oct 2001 16:19:50 -0400


On Thursday 18 October 2001 03:58 pm, sirolae@fisica.unige.it allegedly wrote:
> Hi all,
>
> I'm clueless... It seems that this script keeps every item of
> r['products'] (i.e. the root object) in memory, trashing the machine.
> What did i miss?
> Thanks in advance,
> enrico

AFAIK: a persistentMapping (like a dict) is a monolithic object. It therefore 
is loaded all at once (all keys and values) when it is accessed. That is 
likely using up all of the memory of your machine.

You should use a BTree as your products object if you want it to be able to 
load and unload individual elements from memory.

I think on IOBTree (Integer to object mapping) might work in your case.

hth,
/---------------------------------------------------\
  Casey Duncan, Sr. Web Developer
  National Legal Aid and Defender Association
  c.duncan@nlada.org
\---------------------------------------------------/