FYI: writing to and reading from fields much faster than locals, globals or custom properties
scott at tactilemedia.com
Fri Feb 19 20:35:56 CST 2010
Recently, Josh Mellicker wrote:
> What we found was that when writing and reading a custom property, or a
> variable, in a 1 ms loop, other stack windows became "sluggish" - very
> difficult to drag by the header bar, very difficult to click buttons on,
> rollover states sticking.
> When we replaced with writing to and reading a text field on a substack (still
> 1ms), the other windows responded perfectly normally, you could drag and click
> just like no callback loop was running.
> So I just ASSUMED the field was "faster". Maybe the truth is that custom
> properties , although faster, somehow interfere with normal mouse-related
> processes... or maybe what we found was just specific to our app, although I
> don't see how that could be.
> Anyway, I will do some more tests as soon as I can. I just wanted to post, in
> case someone noticed "sluggishness" in an app with a fast callback loop, my
> advice is, try fields and see if that fixes it - it did for us!
Do you have any custom drag routines in your stack/s? Do you update any
kind of output while the loop is running?
My guess is your repeat loop is so tight that the writing to the field
causes a screen update which slows the repeat loop and allows other events
such as window dragging to take place. In my experience, a repeat loop will
only usually down events when updating the screen repeatedly.
You should also fit some lock/unlock screen into your testing to see how
that affects your loop/s and processing speed.
Tactile Media, UX Design
More information about the use-livecode