Okay, I think I'm brain damaged -- nope, I figured it out
dunbarx at aol.com
dunbarx at aol.com
Thu Sep 12 16:30:49 EDT 2013
I remember someone saying that "before" was the most taxing to the engine.
It is so, and the point where things go south occurs much sooner. Whereas the slowdown takes place at a million plus with "after", the slowdown happens between 10,000 and 100,000 with "before":
put "XXX" into temp
put the ticks into s
repeat 10000 -- (10,000) about 25 ticks. But a minute with 100,000
put temp before accum
answer the ticks - s
From: FlexibleLearning.com <admin at FlexibleLearning.com>
To: use-livecode <use-livecode at lists.runrev.com>
Sent: Thu, Sep 12, 2013 4:20 pm
Subject: RE: Okay, I think I'm brain damaged -- nope, I figured it out
Is 'put "something" BEFORE myVariable' quicker? That way, the engine doesn't
have to track to the end each time.
Just an idea.
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
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
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
More information about the Use-livecode