After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 557950 - Scaling in Gimp 2.6 is much slower than in Gimp 2.4
Scaling in Gimp 2.6 is much slower than in Gimp 2.4
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
2.6.1
Other All
: Normal normal
: 2.6
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2008-10-26 12:07 UTC by Claus Berghammer
Modified: 2008-11-05 19:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
only do multi-pass scaling when scaling down (659 bytes, patch)
2008-10-28 08:32 UTC, Sven Neumann
committed Details | Review

Description Claus Berghammer 2008-10-26 12:07:10 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.
Comment 1 Sven Neumann 2008-10-26 15:46:16 UTC
We have completely changed the scaling implementation. The new algorithm is slower for some cases, but that is not a bug.
Comment 2 Sven Neumann 2008-10-28 08:31:56 UTC
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.
Comment 3 Sven Neumann 2008-10-28 08:32:53 UTC
Created attachment 121499 [details] [review]
only do multi-pass scaling when scaling down
Comment 4 Sven Neumann 2008-10-29 19:38:37 UTC
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.
Comment 5 Sven Neumann 2008-10-29 22:53:43 UTC
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.
Comment 6 Claus Berghammer 2008-11-02 09:55:09 UTC
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
Comment 7 Sven Neumann 2008-11-04 20:47:08 UTC
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.
Comment 8 Claus Berghammer 2008-11-05 11:02:20 UTC
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?
Comment 9 Sven Neumann 2008-11-05 19:27:32 UTC
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.