Trying to understand a behaviour that slows my renders

Ello~

There’s an issue I’ve been having that really slows down my overall rendering process, and it goes like this;

Basically when I open Blender and hit render image, everything will be fine - the image will render in around 5 minutes as expected for the scene.
But, after it is finished, if I then try to render the exact same frame again without changing anything, it will take 2-3 hours to render the image.
The same thing happens if I try to preview the render in the viewport, then render it normally. (and vice-versa, if I render an image then try to preview in viewport, the viewport will just hang in a blank screen indefinitely. This is all Cycles, btw)

The only way I know to fix it is to close and re-open Blender everytime I want to render a second image or preview a render in the viewport after rendering one, etc. - which, with a larger file that takes a while to open/save/close, really starts to add up over time. Though, weirdly, this won’t apply when trying to render an animation of the same scene - Blender will gladly render hundreds of frames back to back at the correct speed then, for some reason… ¯_(ツ)_/¯

I’m guessing it has something to do with memory, as this only really starts to happen with more complex, memory-heavy scenes around 12GB and up, (I have a 4080 Super with 16GB vram and 32GB system ram, for reference), and the fact that restarting Blender fixes it.

So I would really just like to know what exactly is the cause of this, and if there’s any way to get around it without having to constantly restart Blender?

Thanks~

Welcome!

First, do you have “persistent data” active? That option is built to keep data around, so that could explain it.

What is the render’s resolution? If It’s something very large, that can take some memory, because the image is stored within Blender after it’s renderered, and it’s stored as a heavy, 32-bit HDR image so it reacts best to compositing.

As for testing this, I would try 2 things.

  • Make a scene that reaches this massive weight using only basic meshes and textures, no rigs or complex modifiers to interfere. Make a bunch of heavily subdivided cubes and give them many 8k textures. Make the heaviest scene using the most basic of means. If it happens in that scene, you will know it is in fact purely a memory thing.

  • If it doesn’t happen, you will know it’s something in particular that causes the problem. In that case, try hiding different parts of the scene to see if it’s an object in particular. Try rendering without textures to see if it’s a texture, without modifiers to see if it’s a modifier. Try rendering in Eevee to see if it’s the renderer (with low samples, that kind of scene would be slow in Eevee). Narrow down the problem to one object or tool in particular if possible.