Repeat with slow on iOS?

John Dixon dixonja at hotmail.co.uk
Fri Aug 12 15:52:47 EDT 2011




> Is 'repeat with' slow on iOS?
> I notice a 1 or 2 second delay time on my iPad after clicking the button.
> On the desktop however everything is really fast.
> I just do this in a button:
>      repeat with x=1 to 100
>       put "a"&x into tVeld
>       enable fld tVeld
>        put empty into fld tVeld
>        set the backgroundcolor of fld tVeld to white
>     end repeat
> 
> Is there maybe another (faster) way to do this on iOS?

If you run this script on the desktop with all the lines enabled... it takes 395 millisecs
If you run this script on the desktop with the three lines indicated, disabled... it takes 0 millisecs... the same in the iphone simulator.
on mouseUp
   put the milliseconds into theStart
   repeat with x=1 to 100
      put "a"&x into tVeld
      --enable fld 1
      --put empty into fld 1
      --set the backgroundcolor of fld 1 to white
   end repeat
   put the milliseconds - theStart into fld 1
end mouseUp

be well
 		 	   		  


More information about the use-livecode mailing list