Date: | Mon, 28 Jul 2003 12:24:10 -0700 (PDT) |
From: | Prasad Poruporuthan <pprasadb [...] planet-save.com> |
To: | mjd-perl-tiefile+ [...] plover.com |
Subject: | using Tie::File |
Hi mjd,
I have written a Parser module and I am trying to use your Tie::File
to handle large files...
I was trying out some code like this,
=======================================================
use Tie::File;
use Devel::Size qw(total_size);
my @array;
tie @array, 'Tie::File', $ARGV[0], memory => 20000000, recsep => '~';
$size = total_size (\@array);
print "diagnostics : total_size(\@array) = $size\n";
=======================================================
However, I found that even though I defined max cache use to 20,000,000,
the Tie::File module was using a lot more memory.
If I specify files as large 50 MB, it overflows my 256MB RAM,
and even my 512 MB swap.
Could u let me know, if I am doing something wrong.
Your help would be appreciated.
Thanks,
Prasad
Show quoted text
_____________________________________________________________
Save rainforest for free with a Planet-Save.com e-mail account:
http://www.planet-save.com