The Kodak color management system (KCMS) has been replaced in openJDK with LittleCMS (LCMS) starting from Java 10. In Java8 and 9 it was still available but not the default anymore. It could be activated with:
// force KCMS
System.setProperty("sun.java2d.cmm","sun.java2d.cmm.kcms.KcmsServiceProvider");
There were understandable reasons for that: LCMS is an Open Source project, it supports modern ICC profiles, it is maintained (vs. KCMS open bug) and so on. There is a tradeoff however: the ColorConversionOp (CConv) is much slower than the original KCMS. The reason is that KCMS is (4x) multi-threaded but LCMS is not. There is a lengthy thread with all the details...
While everyday users are probably not impacted by this too much, there is one application area which is greatly impacted. I searched for problems with the KCMS->LCMS switch and found the following:
- PDFBox renders much slower (bug at openJDK or here on SO)
- Quoppa PDF library error
- JPEDAL PDF library (bug at openJDK or their blog)
- ...
Quote from jpedal:
Over the last month, we noticed a major slowdown in our regression tests. A test cycle which used to take 30 minutes was taking 82 minutes.
For everybody who wants to try out, there is an example project to test for yourself.
It becomes clear that especially one area is really suffering from this: Java PDF processing.
But why am I writing this?
Would it be possible to create a standalone KCMS library? Which could be loaded for projects which need it? Comparable with the JPG2K lib which was excluded from JAI but made available as a separate lib.
I searched online (and found some documentation however) didn't find the source code for it. Is the code or a lib somewhere available? Would that even be possible?