RFR: 8274112: (fc) Tune FileChannel.transferTo() [v4]

Alan Bateman alanb at openjdk.java.net
Sun Oct 31 19:03:11 UTC 2021


On Mon, 25 Oct 2021 16:57:41 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: Make transferTo0() static; remove check for null FileDescriptor

The latest version looks okay but I'm wondering if we can move transfer_read_write out of the native code. As you know, in this area we try to have the JNI methods do a single syscall. With this change we've put a transfer loop into the native code when it should probably be in Java.

-------------

PR: https://git.openjdk.java.net/jdk/pull/5623


More information about the nio-dev mailing list