Attached a stack which I would like to go faster.
I guess that re-building the array in each of the
functions ROTT16 to ROTT36 is the bottle-neck.
Load a file - some samples included.
Suggestions welcome.
Slow stack needs speed
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Slow stack needs speed
- Attachments
-
- SM Explicator v1.4.zip
- (18.41 KiB) Downloaded 256 times
Is age an excuse? Eighty-four and counting.
Programming powered by coffee.
Programming powered by coffee.
Re: Slow stack needs speed
I am going to have to at least keep a v8 LC around. So many queries involve stacks I cannot open.
Sorry. But someone will chime in soon
Craig Newman
Sorry. But someone will chime in soon
Craig Newman
Re: Slow stack needs speed
Craig
LC 7.1.2 should do it.
LC 7.1.2 should do it.
Is age an excuse? Eighty-four and counting.
Programming powered by coffee.
Programming powered by coffee.
-
- VIP Livecode Opensource Backer
- Posts: 10050
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Slow stack needs speed
@Ross: I can often make time to revise code that may benefit from optimization, but your apps has hundreds of controls and no clear path to focus on. I started to look in one button script, but found that it was sending messages to some 36 other buttons that I can't find there. Not sure how to meaningfully proceed, but while I was poking around I found a few things that will likely boost performance by at least an order of magnitude:
- Within loops, work in variables rather than on the field directly; put the result into the field when the loop is done; field operations are FAR more expensive than variables.
- Use the "repeat for each" loop form instead of "repeat with i = 1 to..." wherever practical.
These are other tips are outlined here, a wonderful thread that wound up covering a wide range of useful optimization tips that brought a routine that used to take 9 minutes down to a few milliseconds:
http://forums.livecode.com/viewtopic.php?f=8&t=24945
@Craig: v7 is generally much slower than v6 or v8.1. Since v8.1 includes some 2800+ enhancements and fixes not found in the now-discontinued v6, and several hundred since the last of the now-discontinued v7 series, it's an efficient and robust option. And since it's currently maintained, it's arguably the best option for work going forward, since OS APIs change frequently and engine updates will be needed to stay on top of those.
- Within loops, work in variables rather than on the field directly; put the result into the field when the loop is done; field operations are FAR more expensive than variables.
- Use the "repeat for each" loop form instead of "repeat with i = 1 to..." wherever practical.
These are other tips are outlined here, a wonderful thread that wound up covering a wide range of useful optimization tips that brought a routine that used to take 9 minutes down to a few milliseconds:
http://forums.livecode.com/viewtopic.php?f=8&t=24945
@Craig: v7 is generally much slower than v6 or v8.1. Since v8.1 includes some 2800+ enhancements and fixes not found in the now-discontinued v6, and several hundred since the last of the now-discontinued v7 series, it's an efficient and robust option. And since it's currently maintained, it's arguably the best option for work going forward, since OS APIs change frequently and engine updates will be needed to stay on top of those.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn