Unused nodes. Do they affect performance?

Question

Random question... On the experimentation process for lights and textures... say I have loads of nodes that remain unused.

Do they interfere with rendering as far as computing power/speeds? Is it best to fully delete or mute them? Or does it make no difference whatsoever?

1 love
Reply
  • Sascha Feider(SFE-Viz) replied

    As far as shader nodes go I'm pretty sure Blender looks at the output node and then calculates backwards. So anything that doesn't have a connection that eventually leads to the output node, should not matter for performance and is like space dust - just floating around not doing anything.
    I remember something where it was talked about that you can have complete node setups within one material and only the connected one gets calculated. Looking at some of my pro assets I use it makes sense, where for example you have different node setups for different flooring patterns and can just plug in whatever you desire, the rest is just there.

    I would assume the same is valid for the compositor. Geo-nodes I don't know for sure, but I would guess it's similar.

    2 loves
  • Martin Bergwerf replied

    Hi Nathalia,

    I am not sure, Andrew Price once mentioned, that unused Nodes were still being calculated, but that was a long time ago and I don't know how informed he was at the time, or how Blender might have become more efficient.

    Personally, I make a habit of not having any unused Nodes in my Node Trees  (or  'crazy' thing like Divide by 2, followed by a Multiply by 2 (Yes, I've seen people do that 🤣)), just to be sure.

    2 loves
  • Nathi Tappan(nathitappan) replied

    Good point. I'd try to maybe delete it on a final project version... but for the experimentation phase it's so handy. It'd be nice if we could even store them in neat framed sections where: connect A for this effect, B for this one other.

    Lol Martin... I can totally see myself being one of these offenders. But at least after watching Assemble I got into the habit of going through the final set up and trying to optimize it. Whenever my math-challenged brain allows lol.

    1 love
  • Dwayne Savage(dillenbata3) replied

    Technically speaking, Yes they affect render times. In reality, It's such a small amount you wouldn't notice unless you have thousands or tens of thousands on newer computers. The size of your blend file will be more noticeable then the added micro-seconds. Now on older computer with older versions of Blender(Pre 2.80) That is a different story. 

    1 love
  • Nathi Tappan(nathitappan) replied

    That is good to know! I'll go back to try and find my bigger node setups and do some testing... I got curious now. Lol.

    1 love
  • Sascha Feider(SFE-Viz) replied

    Reading this here: https://projects.blender.org/blender/blender/issues/123956 and the links in the thread and subsequent ones it might be another one of those rabbit holes. :D And also engine dependent. Curious about your test results.

    • 👍
    2 loves
  • Martin Bergwerf replied

    If it does make a noticeable difference (and even if it doesn't), you could use Node Groups; have several setups in different Groups, so you can easily switch.

    2 loves
  • Nathi Tappan(nathitappan) replied

    Very interesting! Thanks for sharing the link Sascha. Definitely another rabbit hole. But it looks like the worse toll is on the viewport performance?

    I'll start testing it from now on, and it is a great idea to do it with the node groups Martin. One of their demo videos from the link had a few dozen of them in groups and it makes total sense to test it like that!

    1 love
  • Macario Lopez(Mac999) replied

    In the Version I am using (4.3.1) you can:

    File > Clean up > Purge unused Data.

    or

    File > Clean up > Manage unused Data.

    1 love
  • Martin Bergwerf replied

    And when testing, be careful, I am pretty sure, that when you render the exact same thing twice, the second render will be faster.

    So, I'd recommend to render it once without considering the render time, and then start testing the render times between second and third (fourth, etc.) renders

    2 loves
  • Omar Domenech replied

    In the not too distant future, every conversation will start and end with, let the A.I do it. I will be ever watchful Skynet. 

    1 love