Switch your canvas to On Demand.

Canvas specific discussion
Post Reply
Traxus
Regular
Posts: 211
Joined: 30 Nov 2012 06:19
Location: Detroit
Contact:

Switch your canvas to On Demand.

Post by Traxus »

I'm using a modified version of the radial sequencer, had it set to render onFrame (always) and noticed a crazy drop in frame rate / efficiency in my template...

How crazy? Decided to try switching it to onDemand and saw an additional 8 FPS on my iPad 2, from 16 fps to 24 fps.

Having the canvas render on frame was consuming an additional 33% of the renaming available resources just while the template was idling. Over all template efficiency (out of 60 fps) went from around 25% to about 40%.

The fix is painfully simple, set the canvas render to on demand. Within the canvas, add a script that fires on expression. In the expression input area, add a vectral that has every variable that could possible change the state of the canvas. The array in my on expression listener had at least 15 different variables and I still saw this drastic increase. Insert this logic into the script:

Code: Select all

decl c = getobject();
canvas_refresh(c);
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: Switch your canvas to On Demand.

Post by Softcore »

I have been avoiding onFrame scripts like the plague....

I agree with you about the Canvas too!

It is quite rare to want the canvas object to always update - so having it redraw onDemand is definitely the first choice for me!
Post Reply