Chained behavior performance seems fine

Geoff Canyon gcanyon at gmail.com
Wed Jan 24 14:34:09 EST 2018


I was curious about the performance of chained behaviors, so I created a
stack to time them. I compared a button with a behavior to a button with a
chain of 100 behaviors, with the code in the very last button.

The performance diving through 99 extra behavior links was pretty decent --
I was calling this simple function:

function test100
    return 100
end test100

Calling it 1,000,000 times through one behavior took about 1.0 seconds,
calling it the same number of times through 100 behaviors took about 2.4
seconds.

Given that 100 behaviors is an absurd depth to go to, that seems perfectly
reasonable.



More information about the use-livecode mailing list