Operating system: Void Linux (Kernel 5.7.15)
System Specs: AMD TR 3990X, 256GB RAM, AMD Radeon 5700XT
Broken: 2.83, 2.90, 2.91
Short description of error
When rendering with large (6K+) textures some file formats cause Cycles to slow down during rendering. Tested on CPU.
Exact steps for others to reproduce the error
In the below example I started with a fresh scene to test the different formats and their impact on render time.
In a simple scene with small textures <= 4K, there doesn't seem to be much of an impact.
However, when using larger textures (6-8K+) Cycles can sometimes hangs after "Updating shaders", when loading the textures, for an extended time.
The scene below just has Suzanne with a material that has three 8K textures.
When using TGA (the fastest in testing) vs JPG, the scene with targas starts rendering instantly and the scene with jpegs hangs for about 10 seconds after "Updating Shaders"
Other scenes start rendering and hang when the render tiles hit an object with large textures on it.
JPG seems to be the most affected, but I've also seen similar behavior with PNG and TIF files, it's hard to pin down what problematic about specific files and causes this behavior. There's a lot of disk reading happening, even though it pulls more data than the actual size of the textures.
On some scenes, I've seen slowdowns of multiple minutes, both in the viewport render preview and when rendering a frame. Anytime Cycles has to load the textures basically.
Switching color profiles in the image texture settings is also very slow with these jpegs. Packing the textures doesn't alleviate the problem.
Here's another scene that's just that same asset with three 8K textures again and here you can really see the difference in performance.
Just to eliminate any potential system variables, I tested the same file on a Windows machine with an Intel processor and witnessed the same behavior.
One thing I did notice is that Blender is pinned at 100% cpu usage the entire time and it's constantly reading from the disk, even though it seems to read way more data than the actual size of the file. For the jpegs in the example, that's three full minutes of high cpu use and roughly 10-20MB/s reads from the disk, even though the textures only total roughly 115MB for the tree example.
I'm more than happy to share the pine tree file, just not publicly as it contains some assets that I purchased and I want to respect the license.