RFR: 8293017: Improve hash calculation parallelism in jmod/jlink

Alan Bateman alanb at openjdk.org
Mon Aug 29 11:11:12 UTC 2022


On Mon, 29 Aug 2022 10:50:03 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> I would be very surprised if we actually verified the module hashes at startup! That would take minutes to startup on Zero, as observed by its build-time checking. And we don't see that, apparently.

Module hashes are checked at startup when deploying with tightly coupled modules on the module path. You should see some examples if you run the tests test/jdk/tools/jmod/hashes. It's the same thing when configuring the Configuration for module layers at run-time. In the JDK build, the hashes are added at packaging time so you don't see checking when using exploded builds. At run-time, without an application module, then modules are loaded from the run-time image where we can safety skip the checking.

I have no objection to using a parallel-stream be opt-in by the JDK build but I don't think it can be default because it impacts the behavior of standard APIs and out-of-the-box behavior.

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

PR: https://git.openjdk.org/jdk/pull/10060


More information about the core-libs-dev mailing list