RFR: 8266589: (fs) Improve performance of Files.copy() on macOS using copyfile(3)
Alan Bateman
alanb at openjdk.java.net
Thu May 6 18:49:50 UTC 2021
On Thu, 6 May 2021 16:13:03 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> src/java.base/unix/native/libnio/fs/UnixCopyFile.c line 65:
>>
>>> 63: return COPYFILE_CONTINUE;
>>> 64: }
>>> 65: #endif
>>
>> I wasn't aware of this fcopyfile but it seems to be a good match. At some point I think we will have to split up UnixCopyFile to make it easier to maintain the different implementations. That might be the opportunity to do more than COPYFILE_DATA, meaning we could get it to copy the meta data too.
>>
>> I think we should try to re-format the callback a bit to make it easier to distinguish the conditions in the if-statement from the body. I probably should re-format the declaration too to get it a more more consistent/readable.
>
> I agree that it would be good to split it up but as part of a yet to be filed issue.
>
> Would you please elaborate on reformatting the callback? Thanks.
I should have been clearer. L58 splits the conditions on two lines with the second line indented 4 spaces so it looks like the 3rd condition is in the block. I think you should re-format it to make it easier to read.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3890
More information about the nio-dev
mailing list