Gimp 2.10 Cannot Open Large XCF File (Regression to Gimp 2.8)
GIMP version: 2.10.8 Operating System: Debian Linux Package: Version from Debian Buster
I have worked a lot with very large map images in XCF format (35760 x 34932 pixels, RGB colors, one layer, approximately 1 GByte in size) using GIMP 2.8. Loading and saving the images was slow, but actually it has worked rather well.
Now when updating to Debian Buster, I have switched to Gimp 2.10.8. With this version it is not possible to open my large XCF files in a reasonable time. I have not even tried to work with them, because opening just takes too long.
For finding the error, I have compiled Gimp 2.8.22 and tried that version again on Debian Buster. It still works fine. So the problem is the new Gimp version. When setting the total memory size to 100 GByte (if I understand this correctly, it will prevent internal Gimp swapping), opening the large XCF file and running top, I see a significant difference between both Gimp versions:
Gimp 2.8.22 after opening the XCF file successfully:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 14982 bbihler 20 0 12,7g 7,4g 3608 D 23,5 95,0 1:02.97 gimp
Gimp 2.10.8 shortly before killing the process because of impatience:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 15179 bbihler 20 0 25,0g 7,4g 260 D 5,9 94,7 5:12.78 gimp-2.10
So the memory usage seems to have at least doubled. This explains the extreme slow file loading, since my system is swapping heavily. It is not possible anymore to work with Gimp and these large files.
- Crate a (random?) XCF file with size 35760 x 34932 pixels.
- Load it in Gimp.
- Check memory usage.
Expected result: Gimp uses about 13 GByte of memory
Actual result: Gimp uses about 25 GByte of memory
I guess that as a performance optimization more data is cached in memory. Could this be the case? Would there be the possibility to disable such caches for systems with limited memory?