RFR: 8314986: Module readability resolution is slow with large numbers of automatic modules
Alan Bateman
alanb at openjdk.org
Fri Oct 27 06:37:30 UTC 2023
On Tue, 26 Sep 2023 14:57:58 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Fixes the issue (hopefully) by resolving automatic modules and automatic module dependencies after propagation of non-automatic transitive dependencies. The module tests run.
>>
>> I also added a few asserts to validate that the automatic modules don't read themselves (previously this was the case with > 1 automatic module). Should these asserts be added in more places or is this enough?
>>
>> Alan also mentioned a conflict with the spec, I'm not sure which spec is being referred to. The documentation of `ResolvedModule#reads` states `A possibly-empty unmodifiable set`, implying that the set can be empty.
>>
>> Finally, `Configuration#reads` states `// The sets stored in the graph are already immutable sets` but that does not seem to be true. Should something be done about this to limit allocation?
>>
>> Please let me know!
>> Cheers
>
> This issue is on my plate, I will have a PR for this soon. I attached the patch to JDK-8314986 that I was testing in August to skip propagating "requires" through the "requires transitive" edges of the dependence graph. There are several spec issues to work through, the conflict that I mentioned in the JBS issue is that every module is specified to read itself but that is problematic for ResolvedModule::reads to include itself.
> Hi @AlanBateman, you are still taking care of this issue for jdk 22, right? Else I can update the PR.
Yes, it's on my list.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15926#issuecomment-1782374864
More information about the core-libs-dev
mailing list