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

Markus KARG duke at openjdk.org
Sat Feb 25 12:53:19 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?

@bplb I would be happy to continue with merging and removing duplicate code, but I have not yet started this, because @LanceAndersen wrote "I haven't gone through this in detail ... I will look at this more when I am back from the holiday break". So we need to agree *to which extend* we merge both tests (or we need to agree that both files shall become really just one file, as it was originally, before Lance asked to split them). Some background: Originally there was just one file, and it was split into two by request of Lance. So I am not in the position to decide on my own, *which* parts to merge, and *which* parts to keep separated. Can you please give me instructions, which parts you want to keep separated (or confirm that the target really is to just have on single file in the end)? Then I will merge the rest and remove duplicates. Thank you! :-)

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

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


More information about the nio-dev mailing list