RFR: 8368633: (fs) Path.toRealPath(NOFOLLOW_LINKS) very slow on macOS [v3]

Brian Burkhalter bpb at openjdk.org
Mon Oct 13 23:18:02 UTC 2025


On Mon, 13 Oct 2025 22:33:25 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 keys using a second DirectoryStream; improve micro

Sample results from updated benchmark:

Benchmark                  Mode  Cnt     Score   Error  Units
ToRealPath.noFollowLinks  thrpt    5  1434.226 ± 9.299  ops/s  (master)
ToRealPath.noFollowLinks  thrpt    5  2854.991 ± 33.381  ops/s (commit 88b3341)

The proposed change appears in this instance about twice as fast as the mainline.

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

PR Comment: https://git.openjdk.org/jdk/pull/27709#issuecomment-3399366871


More information about the nio-dev mailing list