RFR: 8368633: (fs) Path.toRealPath(NOFOLLOW_LINKS) very slow on macOS [v2]
Alan Bateman
alanb at openjdk.org
Sat Oct 11 06:56:04 UTC 2025
On Fri, 10 Oct 2025 23:02:24 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> Try to avoid checking file keys for all entries by first attempting `Path.compareTo` and `String.equalsIgnoreCase`.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>
> 8368633: Compare byte representations first then file keys; add micro
test/micro/org/openjdk/bench/java/nio/file/ToRealPath.java line 52:
> 50: files[i] = p;
> 51: }
> 52: }
You can use `@TearDown` to remove the files.
I think we'll need the benchmark to exercise some longer paths. Also I think it will have to exercise case sensitive, in this case the benchmark invokes toRealPath on "rEALpATH". That should give you a couple of scenarios that exercise both the first and second iterations.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27709#discussion_r2422547763
More information about the nio-dev
mailing list