[BUG] write to file

J. Landman Gay jacque at hyperactivesw.com
Mon Jan 25 12:36:59 EST 2016


I'm not the team, but logic tells me that opening a file for append will always be faster and more efficient because the URL syntax works as a container, like a field or a variable. Every time you reference a URL, the entirety is read into RAM. I've always used "open for append" for that reason unless the file is known to be very small. 

On January 25, 2016 9:49:57 AM CST, Richard Gaskin 
>my hunch is that using "open...for append" would be 
>slightly more efficient than "write...after", since the former takes 
>advantage of system calls optimized for logging.
>
>However, in your case you're using the URL syntax rather than 
>open/write/close, which leads me to a question for the dev team or 
>anyone who's had the opportunity to look at the relevant part of the 
>engine source:
>
>When using the statement above, is the engine clever enough to use an 
>append operation for that, or does it seek to the end of the file
>before 
>writing?

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the Use-livecode mailing list