On Thu, 8 Sep 2022 07:57:36 GMT, Aleksey Shipilev <sh...@openjdk.org> wrote:
> I have been looking into `make clean-images images` performance, and realized > jmod keeps compressing files with default compression level. Tuning that > toward lighter compression levels improves build performance considerably, > without a heavy loss in *.jmod sizes. > > This PR allows JMOD to select the compression level. Follow-ups would use > this in the build system, see #10214. > > This change nominally requires CSR, but I would like to gauge the reaction to > this patch first, before submitting a formal CSR. The interesting asymmetry > against `jlink` is: `jlink` provides `--compress` option that only takes `2` > for "ZIP compression". I would argue it would be beneficial to add > `--compression-level` to `jlink` as well, so to select the compression level > there too. I gave this a try locally. It's my understanding that this new option is only relevant when creating the `jmod` archive. However, right now, in its current form, I can pass this option to commands like `jmod extract` and `jmod list` without those commands complaining about that option. For example, this following command doesn't complain about the `--compression-level` being passed to it: jmod extract --compression-level=9 jdk/jmods/java.base.jmod Should we instead complain/fail when this option is used for anything other than `create`? ------------- PR: https://git.openjdk.org/jdk/pull/10213