[pybsddb] len() sometimes slow for bsddb3 backed shelves

Jesus Cea jcea at argo.es
Sat Sep 20 05:12:04 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Gregg Lind wrote:
> Sometimes len(S) will take upwards of 3 minutes (and sometimes, it is 
> instantaneous, expecially if it  len() has been called recently)!   Is 
> the problem in the shelve layer?  File I/O?  

Record counter is cached when you do a "db_stat". This counter is
invalidated when the database is updated.

> Working with bsddb files seems to be 
> something of a black art still.

Yes, Berkeley DB is very powerful and so, difficult to master. Well
used, the results are stunning.

When I complete the bindings to fully support Berkeley DB API, I intent
to write some wrappers automating the "difficult" issues when possible.

- --
Jesus Cea Avion                         _/_/      _/_/_/        _/_/_/
jcea at jcea.es - http://www.jcea.es/     _/_/    _/_/  _/_/    _/_/  _/_/
jabber / xmpp:jcea at jabber.org         _/_/    _/_/          _/_/_/_/_/
.                              _/_/  _/_/    _/_/          _/_/  _/_/
"Things are not so easy"      _/_/  _/_/    _/_/  _/_/    _/_/  _/_/
"My name is Dump, Core Dump"   _/_/_/        _/_/_/      _/_/  _/_/
"El amor es poner tu felicidad en la felicidad de otro" - Leibniz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQCVAwUBSNRqBJlgi5GaxT1NAQJu/wP/VSxMGbieju48wROeE2+FGuUS1ZjF+4x+
W4O72TaZx6y9fnA9T3t5DFeQGbno3c56hfwpaFTLaogiE0vB1QWkKPXW5qiferHR
pB27mb9RZ+2NTMB38qq+nCIYaY5A0ZXKqkahB0DQEHdUN84IaADzwIR5Qxpt37bo
p3KRGtZ9rXg=
=0l7N
-----END PGP SIGNATURE-----



More information about the pybsddb mailing list