Okay, I think I'm brain damaged -- nope, I figured it out

FlexibleLearning.com admin at FlexibleLearning.com
Thu Sep 12 16:20:15 EDT 2013


Geoff,

Is 'put "something" BEFORE myVariable' quicker? That way, the engine doesn't
have to track to the end each time.

Just an idea.


Hugh Senior
FLCo



From: Geoff Canyon wrote:

For fifteen years now I've been telling people over and over, "Sure, you
can speed that up dramatically by using 'repeat for each...' instead of
'repeat with i = 1 to the number of...'"

And today, something is going horribly wrong with what I've written, and I
can't see what. :-/

<I wrote a bunch of stuff here about what I was doing to see if anyone
could figure out what was going on>

...okay, I won't bore you all with the details. The tl;dr is that this:

    put "something" after myVariable

is very fast, but gets slower the bigger myVariable becomes. I'm slinging
around 100s of MBs, and LC doesn't really like appending strings to a 300mb
variable...

I have to change to read from my input line by line anyway, and I'll write
to my output the same way, and all the variables will be much smaller then.

Thanks for listening





More information about the use-livecode mailing list