[pybsddb] Len() operation taking a long time

andrew andrew at reurbanise.co.nz
Mon Nov 17 21:19:46 CET 2008


Thanks for the speedy replies, everyone. Looks like storing a separate
count is the way to go. It doesn't have to be 100% exact in our case, so
if we lose the odd one it's no big deal.

On Mon, 2008-11-17 at 09:03 -0500, Chris Mulligan wrote:
> We ran into the same issue and wrapped the class. We store a simple
> count in a special key, __len__, and return that when you call len().
> Maybe not ideal but definitely worth several minutes of performance
> improvement. 





More information about the pybsddb mailing list