T
Tom Sliva
I am using ActiveState Perl 5.6.1 on Win2k with 512Meg RAM. I have
two text files I am trying to slurp. File A is ~2.2M and 35k lines
and File B is ~1M and 43k lines (lines are shorter). I have two of
each file type that I read off the command line. I am slurping them
using the following code.
open (TESTFILE, $ARGV[0]) || die("could not open test file");
@testfile = <TESTFILE>;
close (TESFILE);
repeating for $ARGV[1] through 3 using different array names and
filehandles.
Type A files open and dump in ~1 second. Type B files take ~5 seconds
for the 1st file and ~77 seconds for the second. Additionally if I
rearrange the commandline so that all files read in are of type A, all
4 get read in ~4 seconds. If the commandline is changed to all type B
files, the 1st takes 5 seconds, the second ~77 seconds and the 3rd and
4th files take about 160-165 seconds each. These times stay fairly
consistent even if I open the same type B file 4 times in a row or run
the script immediately after a reboot.
There is no extra whitespace at the end of lines or the file of type B
files. I am out of ideas on what the cause could be.
any suggestions?
thanks,
--Tom
two text files I am trying to slurp. File A is ~2.2M and 35k lines
and File B is ~1M and 43k lines (lines are shorter). I have two of
each file type that I read off the command line. I am slurping them
using the following code.
open (TESTFILE, $ARGV[0]) || die("could not open test file");
@testfile = <TESTFILE>;
close (TESFILE);
repeating for $ARGV[1] through 3 using different array names and
filehandles.
Type A files open and dump in ~1 second. Type B files take ~5 seconds
for the 1st file and ~77 seconds for the second. Additionally if I
rearrange the commandline so that all files read in are of type A, all
4 get read in ~4 seconds. If the commandline is changed to all type B
files, the 1st takes 5 seconds, the second ~77 seconds and the 3rd and
4th files take about 160-165 seconds each. These times stay fairly
consistent even if I open the same type B file 4 times in a row or run
the script immediately after a reboot.
There is no extra whitespace at the end of lines or the file of type B
files. I am out of ideas on what the cause could be.
any suggestions?
thanks,
--Tom