matchText question
Richard Gaskin
ambassador at fourthworld.com
Thu Feb 26 09:38:09 EST 2015
Michael Doub wrote:
> Thanks for the feedback. I did not know about revAvailableHandlers.
I believe it's engine-level, which means it not only provides more
useful info than most alternatives (type, line offsets, etc.), it's also
much faster.
Not sure why it isn't documented, but it's enormously valuable for
static analysis tools.
> As it turns out, that this whole adventure could have been avoided
> if I had better understood the performance implications of the
> different repeat forms.
>
> That all said. Are you guys aware of any performance analysis tools
> for livecode developers?
Now that you've seen the difference between "repeat with" and "repeat
for each", you'll likely never again find a single change with such
dramatic results, so you're more or less done. :)
Still, sometimes it can be useful to trim a microsecond or two - this
article has some tips on performance benchmaring, and includes a link to
RevBench, a very simple tool for comparing alternate algos to find the
best one:
<http://livecodejournal.com/tutorials/benchmarking-revtalk.html>
As for runtime profiling, the only such tool I've seen was an option in
the MC IDE's Script Editor, which was interesting but added so much
overhead to execution that it often slowed things down prohibitively.
Inspired by that I added a very modest form of profiling relative
execution times in my Flight Recorder tool:
<http://fourthworld.net/revnet/devolution/4W_FlightRecorder.rev.gz>
The main benefit of Flight Recorder is as a general message logger, but
it does include loose approximations of relative time spent in each handler.
With the speed of the LC engine, almost any scripted solution will be
both impaired and impairing ("Observer effect"): the overhead it adds
will alter execution.
It would be nice to have something operating at a deeper level, but I'm
not sure what that would look like....
--
Richard Gaskin
Fourth World Systems
Software Design and Development for Desktop, Mobile, and Web
____________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the use-livecode
mailing list