Chained behavior performance seems fine

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Chained behavior performance seems fine

dunbarx via use-livecode
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.
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Chained behavior performance seems fine

dunbarx via use-livecode
Wow, I hope you scripted setting up that test...
On Wed, Jan 24, 2018 at 1:35 PM Geoff Canyon via use-livecode <
[hidden email]> wrote:

> 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.
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Chained behavior performance seems fine

dunbarx via use-livecode
cool thanks for sharing that little test. solves that curiosity.

On Wed, Jan 24, 2018 at 3:59 PM, Brian Milby via use-livecode <
[hidden email]> wrote:

> Wow, I hope you scripted setting up that test...
> On Wed, Jan 24, 2018 at 1:35 PM Geoff Canyon via use-livecode <
> [hidden email]> wrote:
>
> > 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.
> > _______________________________________________
> > use-livecode mailing list
> > [hidden email]
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode