Re: Image Processing Makes Livecode Appear to Crash

2014-02-17 Thread Phil Davis
Almost as good as Alka-Seltzer! http://www.youtube.com/watch?v=qTT1TSdWjkQ ) Phil On 2/17/14, 9:07 PM, Geoff Canyon wrote: On Mon, Feb 17, 2014 at 7:06 PM, Phil Davis wrote: Not sure, but it might make a difference if you update the cursor only every 10th or 20th time through the loop. Like

Re: Image Processing Makes Livecode Appear to Crash

2014-02-17 Thread Geoff Canyon
On Mon, Feb 17, 2014 at 7:06 PM, Phil Davis wrote: > Not sure, but it might make a difference if you update the cursor only > every 10th or 20th time through the loop. Like so: > I read through the first responses in this thread and with each one, in my head I was saying louder and louder, "don'

Re: Image Processing Makes Livecode Appear to Crash

2014-02-17 Thread Ray
Alex, thanks for jumping in here. I'll try that, but in the meantime I must say that of all the posts I've ever made this is one of the most gratifying. I just tried Phil's suggestion of increasing the X-mod to 100 and, just as Phil predicted, I was shocked at the results. Don't know why I di

Re: Image Processing Makes Livecode Appear to Crash

2014-02-17 Thread Alex Tweedly
Or make it time-based rather than number-of-times-through-a-loop put the millisecs into t1 repeat if the millisecs-t1 > somenumberofmillisecs then set the cursor to busy put the millisecs into t1 end if . do something useful end repeat -- Alex. On 18/02

Re: Image Processing Makes Livecode Appear to Crash

2014-02-17 Thread Phil Davis
You may have done this already, but experiment with other cursor update intervals - like every 50th or 100th time. You may be shocked! Phil On 2/17/14, 4:21 PM, Ray wrote: Ah Haa!! You've shaved another 3 and a half seconds off what started out as 40 seconds, got cut down to 5, and is now jus

Re: Image Processing Makes Livecode Appear to Crash

2014-02-17 Thread Ray
Ah Haa!! You've shaved another 3 and a half seconds off what started out as 40 seconds, got cut down to 5, and is now just 1.5 seconds. Very good! Phil - many thanks for your help on this. I'll probably use these ideas on many handlers to come. Ray On 2/17/2014 7:06 PM, Phil Davis wrote: p

Re: Image Processing Makes Livecode Appear to Crash

2014-02-17 Thread Phil Davis
Ray, Not sure, but it might make a difference if you update the cursor only every 10th or 20th time through the loop. Like so: put 0 into x repeat add 1 to x if x mod 10 = 0 then set cursor to busy end repeat Best - Phil Davis On 2/17/14, 2:15 PM, Ray wrote: OK - that trim

Re: Image Processing Makes Livecode Appear to Crash

2014-02-17 Thread Ray
OK - that trimmed about 35 seconds off a 40 second loop with the image I was using. Many thanks! I think the deleting of characters was slowing it down. On 2/17/2014 4:41 PM, Paul Dupuis wrote: No ideas on speeding it up. The only thought looking at the code is you may want to replace 'char'

Re: Image Processing Makes Livecode Appear to Crash

2014-02-17 Thread Ray
Paul, Many thanks for your help here. I'll experiment with this tonight and let you know how it goes. Ray On 2/17/2014 4:41 PM, Paul Dupuis wrote: No ideas on speeding it up. The only thought looking at the code is you may want to replace 'char' with 'byte' ( and numToChar with numToByte) s

Re: Image Processing Makes Livecode Appear to Crash

2014-02-17 Thread Paul Dupuis
No ideas on speeding it up. The only thought looking at the code is you may want to replace 'char' with 'byte' ( and numToChar with numToByte) since you are really dealing with bytes rather than characters and in future LiveCode versions, char may not always correspond to a single byte. I might su

Re: Image Processing Makes Livecode Appear to Crash

2014-02-17 Thread Alex Tweedly
On 17/02/2014 20:16, Ray wrote: That works great! And a little experimenting shows that waiting 0 milliseconds accomplishes the same goal without significantly slowing down an already slow handler. Not to sound greedy but you wouldn't also have any idea how to speed up this loop would you?

Re: Image Processing Makes Livecode Appear to Crash

2014-02-17 Thread Ray
That works great! And a little experimenting shows that waiting 0 milliseconds accomplishes the same goal without significantly slowing down an already slow handler. Not to sound greedy but you wouldn't also have any idea how to speed up this loop would you? Thanks, Ray On 2/17/2014 2:57 P

Re: Image Processing Makes Livecode Appear to Crash

2014-02-17 Thread Paul Dupuis
Ray, Is this behavior (title bar saying "not responding", etc.) happening under Windows 8 perchance? If so, we've seen the same or similar behavior under Windows 8 in long repeat loops. We've found that including a "wait for 1 millisecond with messages" line in the loop and this mostly lets Windo