[ZODB-Dev] PersistentMapping good for large numbers of objects?
Steve Alexander
steve at z3u.com
Tue Jul 22 23:52:00 EDT 2003
> Someone who wants it enough is welcome to write it. I'm not sure it comes
> up often enough to be worth the bother. Sticking Python methods around all
> mutating BTree methods would be delicate and incur a relatively huge speed
> hit. Methods like .update() would have to be faked via a Python loop,
> calling __setitem__ one at a time, else you'd have no hope of distinguishing
> (key, value) pairs with a new key from those replacing the value associated
> with an existing key (the former case should increase the length by 1, the
> latter is neutral).
Or, the code could ask the BTree for its __len__() after the update, and
then store that.
I don't think I use the update method often enough for this to be an issue.
--
Steve Alexander
More information about the ZODB-Dev
mailing list