Need for Speed (postscript)

Jan Schenkel janschenkel at yahoo.com
Mon Jul 16 06:02:32 EDT 2007


--- Jim Ault <JimAultWins at yahoo.com> wrote:
> On 7/15/07 8:37 PM, "Ludovic Thébault"
> <ludovic.thebault at laposte.net> wrote:
> >
> > try to append the result to a file, it's a
> > lot faster :
> 
> Caution:  My limited experience with appending to
> log files is that the
> larger the file size, the slower the append.   Files
> over 4 Mb would show an
> observable effect, and over 10 Mb rendered my apps
> useless.  Of course, I
> did not intend to write such large files, but after
> setting the wheels in
> motion, the log files kept growing.  Ooops.
> 

Hi Jim,

The main reason why your method was slowing down
considerably, is that you were appending to the file
by using the 'put ... after URL ...' method - which
indeed gets slower as the file grows: this method
reads the entire file into memory, appends your data,
and then writes the entire file back to disk.
When you use the 'open file ... for append' and 'write
... to file...' method, you're not reading the file in
anymore, and instead dumping new data at the end of
the existing file.

Hope this clarified things,

Jan Schenkel.

Quartam Reports & PDF Library for Revolution
<http://www.quartam.com>

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)


 
____________________________________________________________________________________
Sucker-punch spam with award-winning protection. 
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html



More information about the use-livecode mailing list