@seltzdesign it’s not totally true ;)
I’ll explain a bit in details how the internals work.
A switch (Node) is internally like a link, so when you change the input value, the graph will only evaluate the parts where the input is active.
Other switches behave like :
If (all inputs are the same) : only evaluate the pin correspording to the input.
If (any inut number is different) : evaluate all upstream.
Now one thing when having a subpatch is that some nodes have an “auto evaluate” flag. So if a node has this flag on, it will evaluate regardless it is required downwards, unless it’s contained in a subpatch, and evaluate pin on this patch is down.
Most animation nodes (damper/linearfilter) do have that flag on, which explains why in the case above most subpatches have a reasonable evaluation time.
On a side note on the DirectX11 side, it behaves (almost) the same, but there’s no concept of autoevaluate, only visible windowed renderers start calls (or readback can also do if requested to do so).
So your patch might still evaluate (vvvv side), but in the screenshot above it will not render.
Please note in DirectX11 some nodes can do an early out.
Group (DX11), DynamicBuffer (DX11) will not update/render on anything upstream if enabled is toggled off, and will also cut down evaluation.
Normally when using reasonably large patches, and lot of scenes, here is more or less my workflow:
- Create a subpatch for all resources (which allows me to preload all i need in background), and use S->R (Node) to use them in the patch where they needed.
- Any dynamic buffer which will not change data, I bang once on start to update them, and use “Keep in memory” pin on to avoid them being deleted -> reupdated. Same for most filetextures.
- Use one (or two if i need crossfade) Switch Node, for texture/layer output. In DX11 case you might prefer texture, since Renderer (TempTarget) uses a pool anyway, so it will not cost you more memory.
- Evaluate pin off is handy, but can be quite dangerous, normally on startup we evaluate all for 5 seconds (so memory is allocated), then start to pick what we evaluate or not (generally it makes transitions much smoother, specially the first time you switch to a subpatch).
- Avoid damper on large spreads, and try to have them as much up on the graph as possible, alternatively, you can use enable pin + s+h (value) just on top of the damper, but mostly you also want a low spread count on it.
- Use as much dynamic buffers, since apply pin to false also cuts evaluate, and they allow you to batch, making your rendering much faster.
Hope that helps.