RFR: 8265448: (zipfs): Reduce read contention in ZipFileSystem [v5]
Lance Andersen
lancea at openjdk.java.net
Mon May 10 10:45:05 UTC 2021
On Fri, 7 May 2021 03:10:32 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
>
> Jason Zaugg has updated the pull request incrementally with one additional commit since the last revision:
>
> [zipfs] Add missing check-failed exception to position/read test
>
> This appears to have been omitted when this test was added.
> To avoid false error reports, the condition must deal with the
> edge case of zero-length entries, for which read will return -1.
Mach5 jdk-tier1, jdk-tier, jdk-tier3 completed successfully
-------------
Marked as reviewed by lancea (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/3853
More information about the core-libs-dev
mailing list