in reply to Re^2: Delay when write to large number of file
in thread best way to fast write to large number of files

What corion said :)

On my old 2006 laptop with 3500rpm harddisk ... processing/printing 18k records with a single open/close takes under four seconds consistently

Doing an extra 18k open/close it takes twice as long or longer ( 7-27)

  • Comment on Re^3: Delay when write to large number of file

Replies are listed 'Best First'.
Re^4: Delay when write to large number of file
by Hosen1989 (Scribe) on Jun 24, 2014 at 10:35 UTC

    Dear Friend,

    Are you say that the next script will finish in less than 30 Sec (with 18K open/close)?

    @RECList = ..... clientname,record sam,plaplapla jame,bobobo kate,sososo ..... print "FLASH A-LIST\n"; foreach my $CDR (@RECList){ my ($filename,$row)= split(/,/, $CDR); open(my $csv_fh, ">> /ClientRrecord/$filename.csv") or die "couldn +\'t open [$filename.csv]\n".$!; print { $csv_fh } $row."\n"; }
      That code don't compile, but a version that does compile is really that fast