Integrated: 8265448: (zipfs): Reduce read contention in ZipFileSystem
Jason Zaugg
jzaugg at openjdk.java.net
Tue May 11 18:10:01 UTC 2021
On Tue, 4 May 2021 13:07:34 GMT, Jason Zaugg <jzaugg at openjdk.org> wrote:
> If the given Path represents a file, use the overload of read defined
> in FileChannel that accepts an explicit position and avoid serializing
> reads.
>
> Note: The underlying NIO implementation is not required to implement
> FileChannel.read(ByteBuffer, long) concurrently; Windows still appears
> to lock, as it returns true for NativeDispatcher.needsPositionLock.
>
>
> On MacOS X, the enclosed benchmark improves from:
>
>
> Benchmark Mode Cnt Score Error Units
> ZipFileSystemBenchmark.read avgt 10 75.311 ? 3.301 ms/op
>
>
> To:
>
>
> Benchmark Mode Cnt Score Error Units
> ZipFileSystemBenchmark.read avgt 10 12.520 ? 0.875 ms/op
This pull request has now been integrated.
Changeset: 0a12605d
Author: Jason Zaugg <jzaugg at openjdk.org>
Committer: Lance Andersen <lancea at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/0a12605df893d782867529812b1d8c10380f603c
Stats: 108 lines in 3 files changed: 95 ins; 7 del; 6 mod
8265448: (zipfs): Reduce read contention in ZipFileSystem
Reviewed-by: alanb, lancea
-------------
PR: https://git.openjdk.java.net/jdk/pull/3853
More information about the core-libs-dev
mailing list