-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
24baa24
commit a12ed63
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |