During the last months, the "levels" editor (Color→Levels) was starting up slower and slower – but only when called up via the menus. Called up a second time by clicking the image (when it was the last tool used) made it show up immediately. But even when called up a second time via the menus, the slowness persisted. Recently, it reached the threshold of being unbearable, taking more than 10s to show up.
I'm not aware of any configuration changes or software installs which could have caused this as a side-effect, so I'm clueless of what the culprit might be.
As it might be useful for comparable problems, I'll include all the steps leading me to the cause. Those only interested in the solution itself: please do as you do with crime stories, skip below to the conclusion :)
TL;DR
To rule out any possible software updates or installs being the root of evil, I decided to "factory-reset" my "personal Gimp" by moving away1 its config folder2 after having closed the application3:
Restarting Gimp, it re-created a fresh config directory – and indeed, my issue was gone: the levels editor started up promptly.
As I didn't want to lose all my personalisations, I decided to rescue those which would not break it again, and thus walked though my backup (
~/gimp-2.6-bak
after above "move" statement):brushes/
,curves/
, etc. Those I could simply ignore.scripts/
folder contained my additional "plug-ins", which I definitly wanted back. So after closing Gimp again, I copied this folder back to~/.gimp-2.6
. Starting the application again showed no side-effects: the levels editor still came up promptly.controllerrc
(simply open the files in a viewer, they are all plain-text. In their headers they will tell you such, e.g. "This file will be entirely rewritten each time you exit." for the mentionedcontrollerrc
file)Finally, I found the culprit:
Solution
In
~/.gimp-2.6/tool-options/gimp-levels-tool.settings
Gimp does not store general settings for the levels tool, as the name would suggest. It rather contains a history of all levels the user ever has set! In my case, those dated back to June 2012 (most likely when I first used Gimp 2.6). You can see those entries when opening the drop-down box on top of the levels editor:Gimp "Levels" editor (click image for larger variant, if needed)
So on each initial start of the levels editor, Gimp had to populate that drop-down – in my case with more than 2,200 entries; which explains what took that long. So the "quick solution" in my case would have been to simply remove that file (or to delete those entries from it which where no longer needed).
Footnotes
1 Don't delete it, it will prove useful later in any way!
2
~/.gimp-2.6
is where Gimp 2.6 stores all personalisations, including configs and additional scripts/brushes etc. When using a different version of Gimp, replace this with the name of yours – e.g.~/.gimp-2.4
for Gimp 2.4, etc.3 It's important to close Gimp first, or it will write back parts of it on its next shutdown