Cycles / Shader Graph optimization: * Unnecessary shader inputs inside the Mix Shader are now ignored, in case the factor is 0.0 / 1.0 and not connected.  This way we save some render time for complex node graphs. 
Cycles / Shader Graph optimization:
* Unnecessary shader inputs inside the Mix Shader are now ignored, in case the factor is 0.0 / 1.0 and not connected. 
This way we save some render time for complex node graphs. 

Example: http://www.pasteall.org/pic/show.php?id=48226
Check the Mix Shader at the end: In this case, Cycles will now avoid the complete huge shader tree, and only calculate the Diffuse Shader.
Rendertime decreased from 1:50 min to 1:20 min on CPU. GPU rendering benefits as well from this. 

This only affects SVM, OSL was already doing these optimizations. 

pyrochlore/cycles,pyrochlore/cycles,tangent-opensource/coreBlackbird,pyrochlore/cycles,tangent-opensource/coreBlackbird,tangent-opensource/coreBlackbird