[ZODB-Dev] BTrees and Mutables, was Re: [IndexedCatalog] bug in default indexing

Toby Dickenson tdickenson@geminidataloggers.com
Wed, 12 Feb 2003 09:32:24 +0000


On Tuesday 11 February 2003 8:17 pm, Nicholas Henke wrote:
> On Tue, 11 Feb 2003 21:09:43 +0100
>
> Andreas Jung <andreas@andreas-jung.com> wrote:
> > What about using the PersistentList?
> >
> > from ZODB.PersisntentList import PersistentList
> > tree['bar'] = PersistentList()
> > tree['bar'].append(4)
> >
> > -aj
>
> From what I can tell it is _slow_, or at least much slower than the
> builtin python list and using _p_changed.

Possibly. PersistentList puts the content into its own persistent object. It 
gets its own oid, seperate activation, and its own entry in the pickle cache 
and ZEO cache.

This is a significant overhead if your list is small, but a possible 
scalability advantage depending on access patterns, particularly if your list 
is large.

-- 
Toby Dickenson
http://www.geminidataloggers.com/people/tdickenson