On Tue, 4 May 2021 13:07:34 GMT, Jason Zaugg <jza...@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 <jza...@openjdk.org>
Committer: Lance Andersen <lan...@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

Reply via email to