RFR: 8278268 - (ch) InputStream returned by Channels.newInputStream should have fast path for FileChannel targets [v17]
Alan Bateman
alanb at openjdk.org
Mon Dec 12 20:07:12 UTC 2022
On Sun, 11 Dec 2022 15:18:54 GMT, Markus KARG <duke at openjdk.org> wrote:
>> This sub-issue defines the work to be done to implement JDK-8265891 solely for the particular case of FileChannel.transferFrom(ReadableByteChannel), including special treatment of SelectableByteChannel.
>
> Markus KARG has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains one commit:
>
> Implementing 8278268
>
> Signed-off-by: Markus Karg <markus at headcrashing.eu>
Which platform was used to generate the performance data? Also what was the source stream? Just asking as FileChannel.transferFrom uses copy_file_range for file-to-file (Linux), memory mapping for file-to-file, and a copy loop for other cases.
In any case, the changes to ChannelInputStream.transferTo does the right thing. Most of the change in the PR is the tests. I don't have time to look at those closely right now but Lance or Brian might have cycles.
-------------
PR: https://git.openjdk.org/jdk/pull/6711
More information about the nio-dev
mailing list