[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] DB_File File Size



Did you ever get a satisfactory response?
I did some research within the berkley db documentation. See my post Re:
DBM files get big and slow. Mess with the HASHINFO structure and watch the
file size change. It is very controllable on my 6100. If not explicitly set
the HASHINFO structure is supposedly set wiht  defaults and according to
the native OS. So I'd like to hear how you can control your system.
If you are not familiar with viewing files as hex I do it with an plug in
to BBEDITLite called hex dump.
--fred
>Hello Folks,
>
>Now that I've gotten relatively comfortable using DB files with Perl CGI
>scripts under UNIX, I thought I'd attempt using them with MacPerl. First
>sample script (with die()'s removed for briefness):
>
>    #! Perl
>
>    use DB_File;
>
>    my $name = "my_db.dbm";
>
>    tie(%$name, 'DB_File', $name, O_RDWR|O_CREAT, 0644);
>
>    for ($i = 1; $i < 10; $i++) {
>         $$name{$i} = time;
>    }
>
>    untie(%$name);
>
>This resulted in a file on my Mac, "my_db.dbm," that was *2.5 megabytes* in
>size! (Allowing $i to run to 100 crashed MacPerl when the DB file was *128
>megabytes.*) Surely that can't be normal behavior. Have I done something
>obviously wrong here?
>
>Thanks in advance.
>
>    -- Matt
>
>Matt Henderson   |   matt@exponet.net   |    www.exponet.net
>                 .                      .
>E x p o n e t   M e d i a  T e c h n o l o g i e s   G m b H
>Full-Service Web Development & Engineering Services Provider
>
>===== Want to unsubscribe from this list?
>===== Send mail with body "unsubscribe" to macperl-request@macperl.org


--
Fred Giorgi <mailto:fgiorg@atl.com>




===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org