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

[MacPerl] DBM files get big and slow



Hi ,

I tried the following script on my 4,5 GB harddisk (with HFS+)
and it was running for about a minute on my G3 card equiped Mac .
The result was a dummy_db file of 20.6 MB size (not bad for 100 hashes).
On an older maschine with a 500 MB harddrive, it runs in some seconds
with a resulting dummy_db of about 30 KB. Is it some sector size related
stuff or is HFS+ not recommended for DBM routines? Any idea what happened ?

#!/usr/bin/perl
use DB_File;

tie (%hash, "DB_File", "dummy_db", O_RDWR|O_CREAT, 0644, $DB_HASH) or die "Cant tie \"dummy_db\"\n";
for($i = 101; $i < 201; $i++)
{
  $hash{$i} = $i + 1000;
  print "$i\n";
}
untie(%hash);




Thanks
Berndt Wischnewski



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