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

Kay C Lan lan.kc.macmail at gmail.com
Thu Feb 18 18:38:22 CST 2010


On Thu, Feb 18, 2010 at 12:10 PM, Josh Mellicker <josh at dvcreators.net> wrote:
>
> 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.
>

Actually, using Richard's benchmark stack, I consistently get
customProperties slower than fields if the LockMessages is false and
the LockScreen is true.

MBP 17" 2.16 GHz, 2GB RAM
OS X.6.2, Rev 4.0.0 Build 950

Number of iterations for read/write access: 5000
LockScreen = true
LockMessages = false

Results:
Visible field, current card: 	23
Hidden field, current card: 	22
Visible field, unopened card: 	14
Hidden field, unopened card: 	14
Custom property: 	37
Global variable: 	2
Local variable: 	1

If Josh was using such a set-up, with fields on an unopened card,
that's a significant performance hit to move to customProperties.



More information about the use-livecode mailing list