[ZODB-Dev] BTree memory bomb

Simon Burton simon at arrowtheory.com
Tue Jan 18 15:16:47 EST 2005


On Mon, 17 Jan 2005 22:34:00 -0700
kosh <kosh at aesaeion.com> wrote:

> 
> Maybe this would help
> 
> http://zope.org/Wikis/ZODB/UnloadingObjects
> 
> I recently did something similar to unload objects I knew I would not need for 
> a while for large gains.

Which object should be invalidated ? It doesn't work to invalidate the btree,
and none of the contents of the tree are Persistant. So, is the answer to only
use Persistant objects in the btree ?

"""If you're storing something very large, such as a 100,000-entry user database, unpickling such a large object will be slow. BTrees are a balanced tree data structure that behave like a mapping but distribute keys throughout a number of tree nodes..... Nodes are then only unpickled and brought into memory as they're accessed, so the entire tree doesn't have to occupy memory (unless you really are touching every single key)."""

What's an example of this use case ?

Simon

-- 
Simon Burton, B.Sc.
Licensed PO Box 8066
ANU Canberra 2601
Australia
Ph. 61 02 6249 6940
http://arrowtheory.com 


More information about the ZODB-Dev mailing list