i have two different algorithms that can solve a step required by a program I’m writing.
In the first idea (yellow nodes), I hold a list till a signal event hit the node, and then i make the flow continue.
In the second idea (blue nodes), I calculate generated values the first time the list changes, hold these and let them go on as soon as signal arrives.
Given the fact:
- the list is composed of hundreds image elements;
- the list changes several time per second; the signal event should be generated less often;
I wonder which is the best solution in term of performances. As Vuo doesn’t (yet?) let you know each single node elaboration cost, My bet is that first solution is more hungry - as I think “Hold list” makes a copy of the whole list each time the list is updated. Is this assumption right?
No, Hold List doesn't make a
Hold Listdoesn't make a copy each time the list is updated, it just keeps a reference to the existing list. Generally, it's more efficient to use fewer nodes, so we'd expect the first (yellow) configuration to be more efficient.