DBM-Deep reviews

RSS | Module Info

DBM-Deep (2.0004) ****

This module was extremely easy to get started with, has very good documentation, and does transparent persistence (the disk file is automatically updated after you modify your data structure and before the program terminates), which other serialization-only modules (Storable, JSON, YAML) don't do.

While KiokuDB may be faster and safer for some applications, DBM::Deep is great when you want a lightweight persistence module for small datasets.

One star off because performance is mediocre: reading a hash of only 4,000 entries, each with two string key-value pairs, from a ~4Mb .db file, takes 6 seconds on a Core i3 CPU running at 2.5GHz.

DBM-Deep (1.0023) **

A naïve approach to data management, and a fatally flawed implementation. It is hard to see anything that this module does right, and the manuals are full of incorrect and ignorant statements - see the annotated POD for a couple of corkers I've found. The shocking approach to IO makes this module perform more slowly than a heavyweight RDBMS, but provides none of the guarantees.

I do not for a moment believe that this module is doing its storage safely. Avoid like the plague.

For a summary of better approaches, I currently recommend reading the data storage chapter of _Advanced Programming Perl, 2nd edition_ by Simon Cozens (O'Reilly).

DBM-Deep (1.0014) ****

I fell in love with this module. It seamlessly creates a transparent, disc-based data structure from within Perl. A milestone.

However until it's XS coded or 100 gigahertz CPUs become commonplace, Deep too slow for most applications. Almost geologically slow, it would often seem: An immense gap between the ivory tower and the bazaar.

So for now I just use MLDBM qw(BerkeleyDB::Hash Storable) It's not everything DBM-Deep is, but it goes about 1000 times faster.

DBM-Deep (2.0004) ****

At first I was totally in love with this module. It was simple, clean, quick, and, dare I say, fun. Deep really does enable turn-key persistence for multi-level data structures, in pure-perl (which is cool).

I still like DBM::Deep a lot, and I might still use it, but the performance became way too slow for my application (Vogon::Poetry is faster). Now I am using BerkeleyDB (which is weird and poorly documented) and achieving artificial multi-leveling via Storable::freeze and Storable::thaw, and sadly, this hackish approach is way faster but much less fun :(

Besides, if I wanted to serialize all of my data structures before hashing, I would not have picked up DBM::Deep in the first place!

A small example:

I had a queue of object refs which I would shift if a certain condition was met on the 0-ith item. To evaluate the condition (a simple regex on one of the properties) and to shift the queue began taking over a minute when I gave up using Deep. At that rate, my program would have run for months instead of days!


Super easy to use, portable, well documented, and fast when used in simple ways.


Really slow with complex data structures. (and by complex, I mean Deeper than a simple hash). Also, Version 1.x seems a lot slower than 0.x. One more odd thing about Deep was all of the 'wide character in print' warnings. I had to escape all of my ord($_) > 255 characters into \x{NNN} format prior to storing...


I would use this module to make databases whenever ease of use, consistency and fun outweigh the sluggishness. I would not use this module to create persistent fancy things like a hash of hashes of arrays of hashes... for example...

In the future:

If this module could get faster, it would take over the world...

DBM-Deep (1.0007) *****

Works as expected, works as documented, works perfectly. I'm using it for tied array type stuffs, with the tie semantics. Awesome, easy, and so very useful.

DBM-Deep (0.98) *****

A very nice and nifty perl module. The documentation is very good and explains everything needed when using it. Locking is supported and the API to access the DBM is covering different approaches.

DBM-Deep (0.96) *****

This very useful module makes an excellent replacement for DBM files and for MLDBM. The author responds quickly to suggestions for enhancements and to bug reports - the bug was in the packaging, not in the module.

The source code is also instructive and well worth reading.

DBM-Deep (0.9) *****

This is a fantastic module! I use it to store extremely large hashes and persist them to disk. It uses a very small amount of space and runs extremely fast. The best part is that it's pure Perl, so there's no surprises when installing it or using it on new platforms.