FYI: writing to and reading from fields much faster than locals, globals or custom properties

Jim Ault jimaultwins at yahoo.com
Thu Feb 18 01:44:57 EST 2010




On Feb 17, 2010, at 8:10 PM, Josh Mellicker wrote:

> You all probably know this, but thought I would share our experience  
> anyway:
>
> We are working on a project with a 1 millisecond callback loop that  
> communicates with an external process in a performance-critical  
> application, and when prototyping, temporarily used some fields on a  
> card to write and read values from during the loop.
>
> Then, while buttoning things up, instead of fields, we switched to  
> reading and writing a custom property.
>
> Suddenly, everything went sluggish - you had to click on a button  
> several times to trigger it, you could barely move stack windows, etc.
>
> It took a while to figure out the culprit, but once we went line by  
> line from our original prototype script, wee found that going back  
> to reading and writing to a field made everything work smoothly again!
>
> Then we tried local, then a global variable... not good... same  
> result as custom properties.
>
> So if you are writing an app where performance is critical, Rev  
> reads and writes to fields super fast! 
> _______________________________________________


Something does not seem to be correct in this instance.

Which version of Rev?  Which platform?
Is the flag "script debug mode" set to false?
Are there any pending messages in the queue?
Front scripts? back scripts?

I have done many performance-critical event loops using variables and  
custom properties in networking apps between computers and offices.   
Whenever I encounter a slow down, I look at my error trapping loops or  
status detection code and find that I have added clock cycles by not  
programming properly.

If you have discovered something that affects the performance so that  
fields are noticeably faster, then we need to know what is happening.   
I have never tested fields to be as fast or faster than custom  
properties, especially for larger blocks of text (such as whole web  
page HTML)

Please, when you have time, provide a little more feedback.

Jim Ault
Las Vegas






More information about the use-livecode mailing list