RFR: 8321620: Optimize JImage decompressors

Claes Redestad redestad at openjdk.org
Fri Jan 12 16:17:22 UTC 2024


On Wed, 8 Nov 2023 11:55:22 GMT, Glavo <duke at openjdk.org> wrote:

> This PR significantly speeds up decompressing resources in Jimage while significantly reducing temporary memory allocations in the process.
> 
> This will improve startup speed for runtime images generated using `jlink --compress 1` and `jlink --compress 2` .
> 
> I generated a runtime image containing javac using `jlink --compress 1 --add-modules jdk.compiler` and tested the time it took to compile a simple HelloWorld program 20 times using `perf stat -r20 javac /dev/shm/HelloWorld.java`, this PR reduces the total time taken from 17830ms to 13598ms (31.12% faster).

I had to merge with master to get jlink to work, perhaps some local issue since Classfile API has been moving around. 

While the improvement to `--compress 1` are impressive, this compression mode is effectively deprecated. I'm not sure your improvements to it here will be enough to reverse that decision (it's still a bit behind on all measures, no?). Perhaps it would be better to split out those changes and move forward with and focus this on the zip decompressor enhancements?

-------------

PR Review: https://git.openjdk.org/jdk/pull/16556#pullrequestreview-1818606132


More information about the core-libs-dev mailing list