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

Lance Andersen lancea at openjdk.java.net
Fri Apr 29 16:48:43 UTC 2022


On Thu, 28 Apr 2022 00:08:18 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: Revert all changes except mapped transfer threshold

Some minor comments. 

I would probably have been tempted to convert this test to leverage TestNG as I think it would streamline the test a bit (or safe this for a future date)

test/jdk/java/nio/channels/FileChannel/TransferToChannel.java line 52:

> 50:     private static final Random RAND = RandomFactory.getRandom();
> 51: 
> 52:     private static final int FILE_SIZE = 1000*1024;

Could use a comment regarding the reason the file size is what it is

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

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


More information about the nio-dev mailing list