why are custom properties so fast?

Richard Gaskin ambassador at fourthworld.com
Tue May 17 02:39:11 EDT 2005


Sarah Reichelt wrote:
> Here are my test results:
> 
> using a field    740 ticks
> using a field (with locked screen)    405 ticks
> using a field from sub stack    230 ticks
> using a field from a sub stack & locking the screen    235 ticks
> 
> The sub-stack's window was not open for these tests. Opening it made the 
> times the same as for a field on the stack running the tests.
> 
> To get meaningful data for the custom property tests, I had to do 500 
> repeats, instead of just 50!
> But dividing my average results then by 10, I got:
> 
> using a custom property    1.9 ticks
> using a custom property with messages locked    0.3 ticks
> 
> This is almost 2500 times faster than the field method!!!!!

Excellent tests, Sarah.

No one seems to enjoy reading my "two buckets" analogy as much as I did 
writing it, but having started once down the road of writing an 
xTalk-like system in C it really does an okay job in describing the 
field overhead difference.  :)

> I really didn't expect to come up with such a big difference, but I 
> expect it will only change my habits in certain circumstances. I like 
> the convenience of being able to see my data when necessary so tend to 
> use the closed sub-stack method. However if you have a vast amount of 
> data to shuffle around and it needs to be done fast, this is a good 
> method to remember.

When I need to access data in properties often, I tend to use my 4W 
Props tool because it lets me see values at a glance and edit them with 
a double-click.

Sometimes I need to make tools for clients to work with property values, 
and in most cases crafting a simple palette window to display those 
takes only a few minutes.

--
  Richard Gaskin
  Fourth World Media Corporation
  __________________________________________________
  Rev tools and more: http://www.fourthworld.com/rev



More information about the use-livecode mailing list