On Mon, 29 Aug 2022 09:33:44 GMT, Сергей Цыпанов <d...@openjdk.org> wrote:
>> Aleksey Shipilev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Touchups > > src/java.base/share/classes/jdk/internal/module/ModuleHashes.java line 170: > >> 168: static ModuleHashes generate(Set<ModuleReference> mrefs, String >> algorithm) { >> 169: Map<String, byte[]> nameToHash = new ConcurrentHashMap<>(); >> 170: mrefs.stream().parallel().forEach(mref -> { > > [AFAIK](https://stackoverflow.com/questions/28985704/parallel-stream-from-a-hashset-doesnt-run-in-parallel) > streams taken from HashSet might have weak parallelism, so maybe it's worth > wrapping `mrefs` into an ArrayList? I instrumented the parallel tasks, and confirmed the full parallelism is used. So this is not an issue. ------------- PR: https://git.openjdk.org/jdk/pull/10060