RFR: 8368633: (fs) Path.toRealPath(NOFOLLOW_LINKS) very slow on macOS
Brian Burkhalter
bpb at openjdk.org
Fri Oct 10 23:02:25 UTC 2025
On Wed, 8 Oct 2025 23:59:53 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`.
The most recent version (5412b62) is the fastest per the micro-benchmark:
Benchmark Mode Cnt Score Error Units
ToRealPath.noFollowLinks thrpt 5 120.930 ± 9.330 ops/s (master)
ToRealPath.noFollowLinks thrpt 5 432.650 ± 20.343 ops/s (commit dff9776)
ToRealPath.noFollowLinks thrpt 5 455.693 ± 23.291 ops/s (commit 5412b62)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27709#issuecomment-3392528421
More information about the nio-dev
mailing list