[ZODB-Dev] [BTrees] bad performance of intersection() over ZEO
Andreas Jung
lists at andreas-jung.com
Wed Aug 4 08:21:35 EDT 2004
Hi,
this morning I discovered that a statement
found = intersection(ids, idx) took up to 80 seconds.
'ids' -- OOTreeset (with up to 1000 items)
'idx' -- OOBTree (with up to 180K items, loaded through ZEO).
I assume that the worse performance comes from loading the whole OOBTree
through
ZEO. Replacing the code with
found = OOSet()
for id in ids.keys():
if idx.has_key(id):
found.insert(id)
reduced the processing time to less than one second.
Is this a flaw in the implementation of intersection() or just
broken-by-design?
Cheers,
Andreas
More information about the ZODB-Dev
mailing list