RFR: 8321591: (fs) Path.of(URI) performance (win)

Roger Riggs rriggs at openjdk.org
Thu Apr 3 22:12:49 UTC 2025


On Thu, 3 Apr 2025 01:07:34 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> Improve the performance of `WindowsPathParser.normalize` by using a `char` array to perform the normalization in place instead of appending to a `StringBuilder`. The `Result` inner class is also converted to a `record`.

I would encourage going further with the refactoring folding two classes into one.
WindowsPathParser is all static methods but with a better name could be a record that is the parsed WindowsPath.
The parsing methods could be either static or overloaded constructors with the input string and normalization flag, invoking the canonical constructor. YMMV.

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

PR Comment: https://git.openjdk.org/jdk/pull/24400#issuecomment-2777105101


More information about the nio-dev mailing list