Large colorrc file causes lag when painting with a new color
GIMP Version: 2.10.8, 2.10.12
Operating System: Debian GNU/Linux 10 (buster)
Package: System package and compiled from source
Issue Description
GIMP writes a new colorrc
file each time a new color is used but the color history stored in it begins to grow extremely large over time. The colorrc
file can become over a megabyte in size once there are more than 20,000 colors in it. This causes GIMP to freeze for half a second whenever painting with a newly selected color.
Performance Log
Performance Log Description
- First generate a large
colorrc
file and write it to the GIMP user profile folder. I wrote a Python script to do this for any arbitrary size: colorrc.py Or use the one I created the performance log with: colorrc Minding that I have a slow HDD, a SSD should have no issue with one of this size. - Start GIMP
- Create a new image
- Select a new color
- Paint with any tool
- Marker 1: Start painting with the new color
- Marker 2: Stop painting
Additional Information
- A large
colorrc
file also greatly impacts the loading time of GIMP. - The color history palette in GIMP seems to be quantized to 8-bit and removes any duplicates, but the
colorrc
file stores unquantized colors picked from 16-bit images as floats to 6 decimal places, essentially storing redundant colors.
Workaround
If anyone else is experiencing this performance issue whenever painting with a new color, just close GIMP, delete the colorrc
file in the GIMP user profile folder (after you've looked at the color history palette to see the rainbow of colors you've painted over the years), and restart it. Happy painting!