LC 8: slowdown of a repeat loop

Tiemo Hollmann TB toolbook at kestner.de
Thu Nov 24 12:05:51 CET 2016


Hello,

I am converting a 384x288 color image into greyscale, looping thru each
pixel of the image and doing some calculations. That works fine.

The user can do some fine adjustments using a slider with a live visual
control of the effect on the image. For each movement of the slider the
looping thru all pixels starts again. Up to LC 6.7 this was pretty
responsive but now with LC 8 moving the slider feels like tearing a rubber
band. It still works, but is much slower and not so the slider isn't really
responsive. Actually it is only a repeat loop with simple LC calculations,
some numToByte and byteToNum. Nothing where I can see what could cause the
slowdown of LC 8, compared with 6.

Before going into each statement of the code, I wanted to ask, if perhaps my
approach is a no go and there could be a better approach or if you say,
that's just like it is. Perhaps I should run the loop only once after
releasing the slider instead of continuously at *scrollbardrag*, but
releasing the slider doesn't fire a *rawkeyup*, so I actually don't know,
how I should trigger that event.

Thanks for any ideas

Tiemo

 

 

 

 

 



More information about the use-livecode mailing list