convert to lower ascii 128?

Ben Rubinstein benr_mc at cogapp.com
Fri Feb 6 02:52:46 CST 2009


Mark Smith wrote:
> One of the things that can slow Rev down in a long for loop is the 
> building up of a long output string (I suspect that an awful lot of 
> copying and moving of memory starts to happen).
> 
> 
> I made a little test of something suggested by someone on this list 
> (Eric Miclo?), that is, that it can be noticably quicker to build up a 
> long string into a file rather than a variable when dealig with a lot of 
> data. What I found on this 2.16G MacBookPro was that after you get to 
> sizes bigger than a few Mb, for each doubling of size, writing to a file 
> doubles the time, while using a variable quadruples the time.

That is handy to know - my instinct is always to pile stuff up in memory
before writing to disk.  Only reluctantly have I recently taken to spooling
out to disk as I go, because of the poor handling of out of memory failures
(see QC #2772).  So good to know that taking the safer approach need not be
slower.

Thanks,

- Ben






More information about the use-livecode mailing list