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

[MacPerl] MacPerl Bloated DB_File



Hi,

Troy Davis posted the following script a while back demonstrating how a DB_File call created a 20.7 MB file on a G3 rather than 128K (or thereabouts factoring for block sizes).

#-------------------------------------------------------------
#!/usr/bin/perl

use DB_File;

tie %h, "DB_File", "test.db", O_RDWR|O_CREAT, 0640, $DB_HASH
        or die "Cannot open file 'test.db': $!\n";

for $i (0 .. 100)
{
	$h{$i} = $i;
}

untie %h;

exit();
#-------------------------------------------------------------

I have also got this happening on a G3/266 running MacOS8.1 and MacPerl 5.2.0r4 however with a new twist. My standard IDE drive is formatted as 'Mac OS Standard' (HFS) and this is where I can demonstrate the problem, on a second drive (a SCSI HD) formatted in 'Mac OS Extended' (HFS+) the problem does not occur. I then double checked this on another G3 with only one drive (IDE) which was formatted in HFS+ and the problem also did not occur. That narrows it down to a G3 HFS issue, any ideas on what may be causing it ?

REGARDS
Paul

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch