[Zope-dev] [Partial Solution] Re: Establishing root objects in ZODB under Zope

R. David Murray bitz@bitdance.com
Fri, 25 Jan 2002 08:51:55 -0500 (EST)


On Wed, 23 Jan 2002, Ross Boylan wrote:
> I'm still wondering about class variables being persistent and the
> efficiency of PersistentList, if anyone has any comments.

Class variables are *not* persisted, since they are class data
and not instance data.

I believe that a PersistentList is a monolithic object (a Python
dictionary that just has "trigger the persistence machinery" hooks
wrapped around the data access methods), so accessing it will
bring the whole list into memory.  If you want to avoid that, and
only pull in (mostly) the data that you need, take a look at the
BTree object type.

--RDM