GNOME Bugzilla – Bug 557950
Scaling in Gimp 2.6 is much slower than in Gimp 2.4
Last modified: 2008-11-05 19:27:32 UTC
Please describe the problem: Scaling images and layers is MUCH slower in Gimp 2.6, than it was in Gimp 2.4. Here are some comparisons I've made: Upscaling image: 500px -> 5000px (bicubic): Gimp 2.4.17: 6,9 sec Gimp 2.6.1: 35,21 sec Downscaling layer: Image is 5000x5000 px, 2 white layers Scaling top layer to 2500x2500px (bicubic): Gimp 2.6.1: 7,85 sec Gimp 2.4.17: 4,78 sec Steps to reproduce: 1. make new image with 500x500px 2. scale it up to 5000x5000px 3. do the same in Gimp 2.4 and Gimp 2.6 Actual results: Gimp 2.6 is FAR slower then its predecessor Expected results: Gimp 2.6 should be (nearly) as fast as Gimp 2.4 Does this happen every time? Yes Other information: System: Windows Vista SP1, GEGL was not used during tests I also tested rotating layers, and this is working as expected (2.6.x slightly faster than 2.4.x) The interpolation mode has effect on the overal processing time, but 2.4 is still faster by the same factor than with interpolation.
We have completely changed the scaling implementation. The new algorithm is slower for some cases, but that is not a bug.
I have done some more tests and I tend to agree that the multi-pass scaling doesn't improve the quality when upscaling. It's a very simple change to get upscaling perform more similar to what GIMP 2.4 has done.
Created attachment 121499 [details] [review] only do multi-pass scaling when scaling down
I have committed this to trunk now so that it can get some more testing before it is merged to the gimp-2-6 branch.
Also merged to the gimp-2-6 branch now: 2008-10-29 Sven Neumann <sven@gimp.org> Bug 557950 – Scaling in Gimp 2.6 is much slower than in Gimp 2.4 * app/paint-funcs/scale-region.c: don't do multi-pass scaling when we are scaling up.
NEWS-File for Gimp 2.6.2 says, that this bug is fixed. But in Gimp 2.6.2 (Windows build) upscaling is even slightly slower than in 2.6.1: Upscaling image: 500px -> 5000px (bicubic): Gimp 2.4.7: 6,9 sec Gimp 2.6.1: 35,21 sec Gimp 2.6.2: 39,88 sec
Looks like something went wrong with your update then. Please start GIMP with the environment variable GIMP_LOG set to "scale" and report the output. It might still be slower than 2.4, but I already explained to you that this is not a bug.
Sorry, the last results I posted were wrong. I usesd a image with 2 layers for the 2.6.2 benchmark, instead of 1 layer :-( Here are the (new) real results: Upscaling image: 500px -> 5000px (bicubic), 1 layer: Gimp 2.4.7: 7,2 sec Gimp 2.6.1: 39,17 sec Gimp 2.6.2: 20,85 sec So 2.6.2 is inded much faster than 2.6.1, but still needs more than twice as long as 2.4.7. Also I set the System environment variable "GIMP_LOG" to "scale" (without quotes), but I cannot see any output (no window, no logfile in gimp directories). Is there anything else to do for windows users?
These numbers look fine to me. Some scale factors are faster in GIMP 2.6, some are slower. Upscaling an image by a factor of 10 is not a common use case though. The bug is closed, all is well. If you can find a way to improve the speed without compromising quality and without scaling down other scale factors, we will appreciate to see your patches.