[ZODB-Dev] BTrees Bug?

Chris Withers chris at simplistix.co.uk
Thu Feb 3 03:16:05 EST 2005


Dieter Maurer wrote:
> In your concrete example: this would read:
> 
>    for key in list(b.keys(0,3)): ...

Indeed, although am I correct in assuming tuple(b.keys(0,3)) would be 
marginally better from a memory and speed point of view?

My one concern about this is that I end up dragging a very long sequence 
into memory, which is one of the things I use BTrees to avoid. Is there 
a way this can be avoided (particularly when doing .items() or 
.values()) or am I seeing a benefit which isn't really there in the 
first place?

cheers,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk


More information about the ZODB-Dev mailing list