Enable zero-copy ByteBuffer publishing in AsyncRequestBody "unsafe" constructors#4096
Merged
millems merged 1 commit intoaws:masterfrom Jul 10, 2023
Conversation
millems
approved these changes
Jun 27, 2023
Contributor
|
Sorry about the delay on reviewing this. Looks great! Kicking off the tests... |
Contributor
Author
|
No worries @millems, wish I could see that test output 😅 |
12 tasks
Contributor
Author
|
hey @millems, |
Contributor
|
It's something silly: |
baa0b8c to
0ba3e4f
Compare
Contributor
Author
|
🤦 fixed |
Contributor
|
Rerunning tests |
|
Kudos, SonarCloud Quality Gate passed! |
Contributor
|
Thanks for your contribution! Sorry about the long time getting it merged. |
L-Applin
pushed a commit
that referenced
this pull request
Jul 24, 2023
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.








Removes guards put in place on #3925 to ensure off-heap buffers were copied to on-heap.
This change to the code enables off-heap buffers to be published directly allowing improved performance zero-copy transfers.
Motivation and Context
see: #3928
This change is effectively running in my own production code where I upload files via MappedByteBuffer, when performance testing I was able to achieve a 25% performance improvement over
TransferManageruploading a 1GB file.Modifications
Removes a condition in
ByteBuffersAsyncRequestBodythat converts a direct (off-heap) buffer to a non-direct (on-heap) buffer.Testing
The functionality is covered by existing tests, I've only removed a test which I put in place as a pre-cursor to this change
Screenshots (if appropriate)
Types of changes
Checklist
mvn installsucceedsscripts/new-changescript and following the instructions. Commit the new file created by the script in.changes/next-releasewith your changes.License