[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-nio-dev
Subject: Integrated: 8259947: (fs) Optimize UnixPath.encode implementation
From: Claes Redestad <redestad () openjdk ! java ! net>
Date: 2021-01-20 15:17:55
Message-ID: ISRsFJtKLYH-AeLWLMReHwX2ZPzQXFk8TXO3X2B10BU=.6f6d1d16-f81f-4774-8db6-d13b3a027226 () github ! com
[Download RAW message or body]
On Tue, 19 Jan 2021 00:35:51 GMT, Claes Redestad <redestad@openjdk.org> wrote:
> This patch improves `UnixPath.encode` by reusing `JLA.getBytesNoRepl` (which has \
> fast-paths for common encoding) and avoiding a `toCharArray` call on the input by \
> refactoring the `normalizeNativePath` code to operate on `String`. This might have \
> a cost on files on Mac that need additional native normalization.
> This removes another `ThreadLocal` and a source of `SoftReference`s. Together with \
> the UTF-8 fast-path my UTF-8 encoded file system see substantial speed-ups in a \
> trivial `new File(str).toPath()` microbenchmark.
This pull request has now been integrated.
Changeset: 5891509d
Author: Claes Redestad <redestad@openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/5891509d
Stats: 107 lines in 6 files changed: 40 ins; 43 del; 24 mod
8259947: (fs) Optimize UnixPath.encode implementation
Reviewed-by: chegar, shade, alanb
-------------
PR: https://git.openjdk.java.net/jdk/pull/2135
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic