From a12ed63c806bc00e9488e421d05edf3a6bfc6f35 Mon Sep 17 00:00:00 2001 From: svc-changelog Date: Fri, 28 Jul 2023 17:14:33 +0000 Subject: [PATCH] Add generated changelog entries --- changelog/@unreleased/pr-1983.v2.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 changelog/@unreleased/pr-1983.v2.yml diff --git a/changelog/@unreleased/pr-1983.v2.yml b/changelog/@unreleased/pr-1983.v2.yml new file mode 100644 index 000000000..a56327ccc --- /dev/null +++ b/changelog/@unreleased/pr-1983.v2.yml @@ -0,0 +1,19 @@ +type: improvement +improvement: + description: |- + BinaryRequestBody and ContentBody use InputStream.transferToOutputStream + + Allow for optimization when underlying input stream (such as `ByteArrayInputStream`, `ChannelInputStream`) overrides `transferTo(OutputStream)` to avoid extra array allocations and copy larger chunks at a time (e.g. allowing 16KiB chunks via `ApacheHttpClientBlockingChannel.ModulatingOutputStream` from #1790). + + When running on JDK 21+, this also enables 16KiB byte chunk copies via `InputStream.transferTo(OutputStream)` per JDK-8299336, where as on JDK < 21 and when using Guava `ByteStreams.copy` 8KiB byte chunk copies are used. + + References: + * https://github.com/palantir/hadoop-crypto/pull/586 + * https://bugs.openjdk.org/browse/JDK-8299336 + * https://bugs.openjdk.org/browse/JDK-8067661 + * https://bugs.openjdk.org/browse/JDK-8265891 + * https://bugs.openjdk.org/browse/JDK-8273038 + * https://bugs.openjdk.org/browse/JDK-8279283 + * https://bugs.openjdk.org/browse/JDK-8296431 + links: + - https://github.com/palantir/dialogue/pull/1983