RFR: 8303934: (fc) Use splice in FileChannel::transferFrom when the source is a pipe (Linux)
Alan Bateman
alanb at openjdk.org
Mon Mar 13 12:39:21 UTC 2023
On Fri, 10 Mar 2023 00:35:38 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> On Linux, perform `transferFrom()` via the `splice(2)` system call when the source `ReadableByteChannel` is a `Pipe.SourceChannel` (`sun.nio.ch.SourceChannelImpl`).
A concern with optimizations like this is that they don't coordinate with other methods on the source channel, in this case read and close. This goes for the optimizations in the transferTo implementation too.
-------------
PR: https://git.openjdk.org/jdk/pull/12965
More information about the nio-dev
mailing list