[Zope3-dev] Re: [Checkins] SVN: zc.dict/trunk/ Initial version of
zc.dict -- a persistent BTree based "dict".
Bernd Dorn
bernd.dorn at lovelysystems.com
Tue Jul 3 14:59:26 EDT 2007
On 03.07.2007, at 20:39, Albertas Agejevas wrote:
> Log message for revision 77375:
> Initial version of zc.dict -- a persistent BTree based "dict".
>
>
hi
this package matches a use-case we have often, very nice!
just some thoughts
use a BTree.Length object to hold the length, otherwise you will get
loads of write conflicts, see also what i have done in
zope.app.container this week
there is also a small bug in __setitem__ ... if the key exists, the
len is increased without a key being added (note, in my
zope.app.container this is not the case because you get a duplication
error if this happens)
you should use __setitem__ internaly for update etc, because
computing the length of a btree takes very long time, it has to fetch
all buckets from zodb. if u use zeo it gets even slower
regards, bernd
More information about the Zope3-dev
mailing list