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



_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to