[ZODB-Dev] Checking the length of OOBTree

Leszek Syroka leszek.marek.syroka at cern.ch
Thu Apr 8 11:36:36 EDT 2010


Hi,

what is the fastest way of checking the number of elements in OOBtree. 
Execution time of

len( OOBtree.keys() ) and len(OOBtree)

is exactly the same. For big data sets execution time is unacceptable. I 
found out that in the implementation of OOBtree (written in C) there is 
a variable called 'len', which seems to contain the length of the tree. 
Is it possible to access that variable from the python code without 
modifying the source?

Best regards
Leszek


More information about the ZODB-Dev mailing list