RFR: 8367005: ImageReader refactor caused performance regressions for startup and footprint [v2]

Chen Liang liach at openjdk.org
Thu Sep 11 03:15:10 UTC 2025


On Thu, 11 Sep 2025 01:31:07 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> When called from SystemModuleFinders this really should never happen (arguably it's IAE) so it won't make a difference per-call if it's changed, and it won't really help reduce the time of the locked section.
>> Both checks will basically always be done, so ordering isn't an issue (but a fair point to raise).
>> 
>> Module names are typically short, so while a string scan is not ideal, it's not awful (and we do string concatentaion later anyway). Ideally there would be a ModuleName type to use as the parameter.
>
> While you are at it, both findNode and BuildModulesNode should have comments indicating that the node can be found in one of two places.

If something shouldn't happen, I would prefer an explicit exception or at least an assert.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27203#discussion_r2338400975


More information about the core-libs-dev mailing list