Cycles: Lots of materials makes Blender slow

I noticed, only in one of my Blender scenes (International Airport) that it is very slow when doing anything with materials. I only have roughly 40 materials, and probably 60 textures loaded in the scene. Most lag is from trying to assign materials to meshes, and takes a few minutes for the heavy lag to clear.

Why is this so, and how can it be reduced? My compter works fine with everything else, except materials in this specific file.

Is this while Cycles is actively rendering a preview?

No. It is in the 3d view, not even with material rendering, just object view.

what size of images ?

how many verts faces ?

happy bl

Most of the images are 1k to 2k.
There are a few hundred thousand faces if I recall correctly.

From my experience, there are cases where Cycles might initiate the rendering of previews for every single material in an object (even if the preview window is closed and even if the material is not the one selected).

The approach in general is kind of dumb, as it can indeed cause lag if the materials in question are complex.

1 Like

Oh yes, you are right! I didn’t think about the rendering of those previews being the cause. What you stated matches exactly what was experienced.

I suppose because of this, there isn’t any way to prevent it or reduce it, right?

I rarely use that amount of materials, certainly not textures. But sometimes Blender can constantly use a lot of resources for no apparent reason. Preview window is off, but all CPU is used. Restarting tends to fix it, so it’s not a showstopper, but I always have task manager up to check what’s going on.

I have exactly the same problem, with more than 30 materials Blender is extremely slow. even if I turn off the preview