Marc said:
I wrote a PERL program to creat thousands of files. The program zips
along at first but then begins to slow down.
Does any one have any ideas on what might be causing this?
yes. you are doing at leas 3 things wrong:
a) you are createing all these files in the same directory, and your filing
system
slows down as the number increases
b) you use a fancy method to make sure the file does not exist already.
for my $fileno (1....10000) {
$subnum=0;
$subnum++ while (-f "file_$subnum");
# create file
}
you have to do more and more work for each file
if you had called your file "file_$fileno"."_$subnum" instead,
you would not have had this problem
c) the logic error on line 42 makes you create file number n
n times.
gnari