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

Steve Alexander steve at cat-box.net
Thu Jul 17 17:22:30 EDT 2003


> How slow would mybtree.keys() be in case of 20,000 objects?

Write a simple benchmark that is typical for the use you expect in your 
application. That shouldn't take more than half an hour.

> Slower than 
> with a plain dict or PersistentMapping? Should a separate list be kept, 
> probably, along the lines of BTrees.Length?

Perhaps. I don't think I'd bother. I'd look more at why I want this 
information, and try to do something specifically about that.

Do you need all of the keys? Perhaps if you don't need all of the keys 
at once, mybtree.iterkeys() would serve your purposes better.

--
Steve Alexander




More information about the ZODB-Dev mailing list