home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.pascal.borland      Borland Pascal was actually pretty neat      2,978 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 1,583 of 2,978   
   Floris to All   
   slow writing of text files   
   11 May 05 12:37:59   
   
   From: iemand@microsoft.com   
      
   Hello all,   
      
   I'm using freepascal to write text files, but it writes really slow.   
   It looks something like this and it writes with about 300 KB per second:   
      
   for i:=1 to 1000 do begin   
     outfilename:='myname' + integertostring(i) +'.txt';   
     Assign (outfile,outfilename);   
     rewrite(outfile);   
      
     for j:=1 to 16000 do begin   
       for k:=1 to 4 do begin   
         write (outfile,myarray[i][j][k]:2:2,',');   
       end;   
       writeln (outfile);   
     end;   
   end;   
      
   close (outfile);   
      
   If I replace myarray[i][j][k] with a constant string I get write speed of   
   about 20 MB. Is there a way of speeding up the write process?   
   Writing to a binary file is much faster but not an option at the moment.   
      
   Floris   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca