RFR: 8274112: (fc) Tune FileChannel.transferTo() [v6]
Alan Bateman
alanb at openjdk.java.net
Fri Apr 29 13:20:47 UTC 2022
On Thu, 28 Apr 2022 00:08:18 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> Please consider this patch which would improve the performance of
>> `FileChannel.transferTo()` on macOS and Windows.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>
> 8274112: Revert all changes except mapped transfer threshold
I think you've got this to a good place and much simpler than the early iterations. So I think the src changes are good. I don't have time right now to do a detailed review of the test, maybe @LanceAndersen might be help on that.
src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java line 1384:
> 1382: // Transfers from src to dst, or returns IOStatus.UNSUPPORTED (-4)
> 1383: // or IOStatus.UNSUPPORTED_CASE (-6) if kernel can't do that
> 1384: private static native long transferTo0(FileDescriptor src, long position,
It might be better to say "if the kernel does not support it" rather than "kernel can't do that".
-------------
Marked as reviewed by alanb (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/5623
More information about the nio-dev
mailing list