Need for Speed (postscript)

Jan Schenkel janschenkel at
Mon Jul 16 05:02:32 CDT 2007

--- Jim Ault <JimAultWins at> wrote:
> On 7/15/07 8:37 PM, "Ludovic Thébault"
> <ludovic.thebault at> 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

"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.

More information about the use-livecode mailing list