Transform High CPU Usage/Freeze in large projects
Environment/Versions
- GIMP Version: 2.99.6 and 2.10.24
- Package: Installer from GIMP.org
- Operating System: Windows 10
- RAM: 32 GB
- Free HD Space: 24 GB
Issue Description
Transform operations (using Unified Transform) that are nearly instant on a simple empty document seems to take much more CPU power on larger projects with more layers.
It's to a point where transform operations on my projects with 100+ layers takes 10-20 seconds to even get to 50% or 75% of the transform operation and then GIMP freezes.
The logs and video in this reports were done in 2.99.6 but the issue is seemingly identical in 2.10.24
- Re-scaling the layer when its moved to an otherwise empty project is nearly instant and uses at most 3% CPU.
- The same operation on my larger project takes up to 20 seconds and uses up to 30% CPU for the full duration, with some 50% chance of freezing GIMP.
Performance Log
gimp-performance_Transform2.log
Performance Log Description
This is me transforming a layer in my big project using Linear Interpolation, resulting in GIMP freezing at around 75% of the transformation. Since I had to Terminate GIMP using the Task Manager I'm not sure if the performance log is perfect, but at least it doesn't seem to be corrupted.
Video: 2021-07-02_12-37-26
Additional Information
Changing the interpolation to None seem to remove the issue totally. And setting it to any of the more powerful options seems to exasperate the issue.
It seems a bit weird that a CPU operation takes longer time to perform based on the amount of layers in the project, and the fact that it actually ends up crashing my GIMP at times makes me hesitant to use the tool at all.
I also tried Image-->Scale layer and I seem to have the same issue there, so it doesn't seem to be an issue exclusive to the Unified Transform Tool.
Update: Non-Linear Light seems to be a factor?
Switching the project to Linear Light seemingly removes this issue totally. This video shows me doing the transform with the project converted to Linear Light, the transform is nearly instant. When I then switch it over to Non-Linear light (which is my usual setting) the same transform operation takes much longer. 2021-07-02_12-58-28