FYI: writing to and reading from fields much faster than locals, globals or custom properties
jim at visitrieve.com
Fri Feb 19 20:55:54 CST 2010
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.
Ahhh...Now THIS makes sense. Your repeat loop is so tight that the GUI
becomes unresponsive. It has nothing to do with the actual speed of
variables vs. fields. Please add, somewhere in your repeat loop:
wait 0 milliseconds with messages
> 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.
Yes, because here other handlers are starting and stopping and this gives
the engine opportunity to intervene.
> 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.
It's the repeat loop itself without any wait or other handlers being called.
> 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!
Just add the wait into your repeat loop with vars or custom props and you
will see it is even faster than fields. ;-)
Aloha from Hawaii,
More information about the use-livecode