anydbm is slow

Amir Michail amichail at cse.unsw.edu.au
Thu Jan 3 16:13:23 EST 2002


Hi,

After more careful examination of my code, the bottleneck
turned out to be elsewhere.  Sorry about the misleading
statement on anydbm!

Amir

On Fri, 4 Jan 2002 02:07, Sean Reifschneider wrote:
> On Wed, Jan 02, 2002 at 11:19:24AM +1100, Amir Michail wrote:
> >It returns dbhash from '/usr/lib/python2.1/dbhash.pyc'.
> >
> >Perhaps I should use a different db package?  The data consists
> >of an enormous number of keys and relatively short data strings.
>
> I used anydbm for radiusContext and in general it worked pretty well.
> I didn't consider it very slow, and it's not unusual for it to be dealing
> with several hundred megabytes to over 1GB of data.  It stores a fair bit
> of payload for every key, though.
>
> One thing I did find was that letting anydbm pick the dbm module, which
> I eventually found would, after inserting a lot of elements, generate an
> exception on insertion.  It, unfortunately, wasn't very reliable and I
> never ended up tracking it down.  I did end up switching to gdbm, which
> solved the problem.
>
> You can see what I did by looking at the code for a recent radiusContext at
> ftp://ftp.tummy.com/pub/tummy/radiusContext/
>
> Sean




More information about the Python-list mailing list