Page 1 of 1

What's more efficient?

Posted: 11 Feb 2015 14:36
by oldgearguy
Having 3 or 4 small scripts running "On Frame" or having 1 larger script running "On Frame" ?

One would think that having a single point of entry/exit for on frame tasks would be better, but I don't know this for a fact.

Anyone have any concrete info/ideas? As a programmer I tend to gather related scripts/variables into a container/object so I tend to use multiple on frame scripts when needed since each one is localized and I don't have to reference targets like: if (LFOMain.LFO1.Waveshape.x == 0), but again, I don't know the processing tradeoff of dereferencing variables across a template versus multiple scripts.

Re: What's more efficient?

Posted: 11 Feb 2015 15:03
by MrCorba
I don't know if it uses more/less resources but I tend to use 1 On Frame script that checks values and then calls the appropriate script. So just use the On Frame script for value checking and all of the actual scripting in separate scripts.