Hi. I've been scripting in LC 6+ for some time but now I wish to convert my stacks over to LC8. It seems slower for most things. For example, the script combo below used to take about 5 seconds and now, in LC8, takes about 20 seconds. Is there anything I should be doing to speed things up?
function theLibraryScripts p1,p2,p3
put empty into t1
put the libraries into t2
repeat for each line x in t2
put (the script of stack x) & cr after t1
end repeat
return t1
end theLibraryScripts
on theLibraryScripts p1,p2,p3
put theLibraryScripts(p1,p2,p3) into field 1
end theLibraryScripts
Also, I'd bet that someone has a note sheet for LC8 conversion if you wish to share it.
Thanks, Joseph
Conversion to Livecode 8+
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 10049
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Conversion to Livecode 8+
What's in the arguments p1, p2, and p3, and why are they being passed to theLibraryScripts but not used there?
Also, how did you measure the time? Could it be that some of that may be taking place outside of these two handlers, in the handlers that call them?
Also, how did you measure the time? Could it be that some of that may be taking place outside of these two handlers, in the handlers that call them?
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
Re: Conversion to Livecode 8+
The params p1,p2, and p3 are just placeholders in case later I wish to add arguments later. I tried commenting them out on both handlers, but there's no change.FourthWorld wrote:What's in the arguments p1, p2, and p3, and why are they being passed to theLibraryScripts but not used there?
Also, how did you measure the time? Could it be that some of that may be taking place outside of these two handlers, in the handlers that call them?
I measured the time by putting the seconds/start time and end time into globals gBench[1] and gBench[2] and subtracting the difference, but I also tried it without benching the time just by looking at a clock and it's pretty much the same.
Re: Conversion to Livecode 8+
Oops, my bad.
Previously, I had called a separate handler that created a field to put the data into. Your response made me think twice, and when I put it straight into the field without the createField handler it was instantaneous. I'll review the previous handler and see if I can catch the delay there. Thanks, Joseph
Previously, I had called a separate handler that created a field to put the data into. Your response made me think twice, and when I put it straight into the field without the createField handler it was instantaneous. I'll review the previous handler and see if I can catch the delay there. Thanks, Joseph