RFR: 8316156: (ch) Channels.newOutputStream(ch).write(bigByteArray) allocates a lot of direct memory [v5]
Brian Burkhalter
bpb at openjdk.org
Tue Sep 19 17:40:43 UTC 2023
On Tue, 19 Sep 2023 16:59:46 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> It would make sense to clamp the uses of `transferTo` in `Files.copy` to a maximum chunk size [...]
The problem with chunking `InputStream.transferTo` here is that it _might_ seriously compromise performance when the IS is backed by a FileChannel.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15733#issuecomment-1726203513
More information about the nio-dev
mailing list