RFR: 8278268 - (ch) InputStream returned by Channels.newInputStream should have fast path for FileChannel targets [v17]

Brian Burkhalter bpb at openjdk.org
Wed Feb 22 23:05:03 UTC 2023


On Fri, 17 Feb 2023 16:50:44 GMT, Markus KARG <duke at openjdk.org> wrote:

>> 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.
>
> @AlanBateman @LanceAndersen Kindly asking to resume this MR. Thanks! :-)

@mkarg: Comments from @LanceAndersen on 2 January 2022:

> I haven't gone through this in detail, but we want to merge The remaining TransferTo2 tests into TransferTo. For the large File tests, any duplicate code can also be included in the base class.

Unless I missed it somehow, I don't see that this has been addressed. Is there an intent to perform the suggested test merging and duplicate code consolidation?

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

PR: https://git.openjdk.org/jdk/pull/6711


More information about the nio-dev mailing list