Hi Hal,

From: "Hal Fulton" <hal9000 / hypermetrics.com>
> I've narrowed down the SDBM behavior a little more.
> 
> It seems to crash when storing "long" values in the db.
> The first string it happens with is 2330 chars in length.
> (As opposed to the average in this db, which is more
> like 300 bytes.)
> 
> A little more experimentation shows that it will accept
> 800 bytes OK, but not much more.
> 
> Anyone know what's going on here?

Sorry I can't help, just wanted to add that I tried an
SDBM experiment yesterday, on Windows, and it seems like Ruby's
SDBM exhibits the same odd behaviors as Perl's.  (Last
time I tried Perl's was about 5 years ago.)  I'm guessing
they maybe share the same implementation.

I've found SDBM to be remarkably inconsistent about
what size values it will accept.  The smaller size 
values, the "more" of them I'm likely able to stuff
into the SDBM before it gacks.  The larger size 
values, the fewer I seem to be able to store before
it finds one it "can't" store.

One of my tests yesterday was to try to store
1,000,000 key/values.  The keys were always length 8.
The values were random, between length 1 and length
511.  After several minutes it managed to store about
47,000 keys before it upchucked a "sdbm_store failed".
And the .dbm file was up to 1.7 GB.

For my upcoming project, I have need of a dbm that
can store (preferably) arbitrary length keys, and
definitely arbitrary length values.  (I haven't looked
at what's available yet on RAA.)  And I don't want it to 
bloat up to 1.7GB when it only has 47,000 small values 
stored in it!  <grin>

I've done some design on paper, and it seems almost
trivial to write.... So I'm wondering if I'm overlooking
some hidden gotcha that will make it more difficult than
I'm expecting.  :)

. . . Guess I would do well to read the current 
implementation first...  But anyway, I'm seeing the
same ol' flaky behavior I remember from Perl.


Regards,

Bill