Do substance graphs only process nodes in the graph that actively have an influence on the output nodes (e.g. Similar to Maya)? From what I'm seeing, it doesn't seem like it. For example:
1. uniform color connects to both inputs of a switch.
2. The switch connects to an output node.
3. For the switches False statement I insert a custom graph that takes 10 sec to eval.
If the switch is set to true, and I clear the graph's timing, the false path connection still give me timing info and the links between the nodes switch from dotted to solid (indicated they've been evaluated) even though the switch is set to true.
To me this seems like the graphs push data instead of pull data. Am I wrong?
As a general precaution, you can uncheck the Enable image cache option in the Graph view toolbar. Using the image cache involves rendering all nodes which are part of a stream connected to a node/graph output displayed in the 2D View or 3D View, regardless of the actual state of parameters and data flow. This impacts the rendering stage of the graph calculations.
Before rendering, the cooking stage processes the graph to determine the actual computations that need to occur to render the final outputs. The connections turning from a dotted to a solid line demonstrate the completion of the cooking stage for that part of the graph.
This cooking stage includes an optimisation pass which should indeed trim out the unused branches of a graph, such as the unselected input of a Switch node.
However, this does not appear to occur, we were able to verify that during our own testing. Unused branches are still cooked, resulting in the timings you observed.
We are investigating further with the goal of solving or mitigating this issue. This can involve a rework of significant scope, thus we appreciate your patience with the current implementation and thank you for your report!