[ZODB-Dev] PersistentMapping good for large numbers of objects?

Stefan H. Holek stefan at epy.co.at
Thu Jul 17 15:36:54 EDT 2003


With regard to this notice in BTrees.Interfaces:

###############################################################
# IMPORTANT NOTE
#
# Getting the length of a BTree, TreeSet, or output of keys,
# values, or items of same is expensive. If you need to get the
# length, you need to maintain this separately.
#
# Eventually, I need to express this through the interfaces.
#
################################################################

How slow would mybtree.keys() be in case of 20,000 objects? Slower than 
with a plain dict or PersistentMapping? Should a separate list be kept, 
probably, along the lines of BTrees.Length?

Thanks,
Stefan



--On Donnerstag, 17. Juli 2003 08:21 -0400 Jeremy Hylton <jeremy at zope.com> 
wrote:

> On Thu, 2003-07-17 at 08:11, Chris Withers wrote:
>> Hi,
>>
>> Would PersistentMapping be suitable for storing around 20,000 objects or
>> should  some flavour of BTree be used instead?
>
> BTree.
>
> Jeremy

--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.               /Pete McBreen/



More information about the ZODB-Dev mailing list