RFR: 8260337: Optimize ImageReader lookup, used by Class.getResource [v2]
Jim Laskey
jlaskey at openjdk.java.net
Wed Jan 27 18:25:40 UTC 2021
On Mon, 25 Jan 2021 16:09:01 GMT, Claes Redestad <redestad at openjdk.org> wrote:
>> This patch optimizes the code paths exercised by `String.class.getResource("String.class")` by:
>>
>> - Adding an ASCII fast-path to methods verifying strings in the jimage, which can then be done allocation-free
>> - Avoiding the allocation of the `long[8]` attributes when verifying only for the purpose of verifying a path exists
>> - Using the `JNUA.create` fast-path in `SystemModuleReader` (which should be OK since we just verified the given name is a JRT path)
>> - Remove a redundant check in `Class::resolveName` and fitting the `StringBuilder` to size
>
> Claes Redestad has updated the pull request incrementally with one additional commit since the last revision:
>
> Copyrights and rename containsLocation
Nice clean up. LGTM
-------------
Marked as reviewed by jlaskey (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/2212
More information about the core-libs-dev
mailing list