-
Notifications
You must be signed in to change notification settings - Fork 1k
Optimize json marshaller #6857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Optimize json marshaller #6857
Changes from 13 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
2605aaf
Optimize json marshaller (first pass for testing)
alextwoods 3a48144
Refactor code to reduce duplication from switch statement
alextwoods 9be8184
Change approaches - move cache into the marshaller instead of SDKFields
alextwoods a837836
Merge branch 'master' into alexwoo/json_marshall_opt
alextwoods 6f5bf03
Optimize byte buffer/output stream
alextwoods 6776dc9
Optimize binary marshalling
alextwoods c3993ac
Try new more dynamic output stream approach
alextwoods 23cf86e
Merge branch 'master' into alexwoo/json_marshall_opt
alextwoods b4ae8a7
Cleanups
alextwoods e93c62f
Improve testing
alextwoods 6f264af
Merge branch 'master' into alexwoo/json_marshall_opt
alextwoods 5198d8e
Remove computeIfAbsent from the warm path
alextwoods b71bc56
Extract SdkByteArrayOutputStream and GC optimizations to separate branch
alextwoods 58a9d99
Move large SDK_BYTES test to alexwoo/json_huge_gc_opt branch
alextwoods a3feb6c
Move writeBinaryValue and SDK_BYTES asByteArrayUnsafe optimization to…
alextwoods 0066051
Merge branch 'master' into alexwoo/json_marshall_opt
aws-sdk-java-automation 6ba98cb
Merge branch 'master' into alexwoo/json_marshall_opt
alextwoods File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "type": "feature", | ||
| "category": "AWS SDK for Java v2", | ||
| "contributor": "", | ||
| "description": "Optimized JSON marshalling performance for JSON RPC, REST JSON and RPCv2 Cbor protocols." | ||
| } |
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we using
asByteArrayUnsafe()? The original implementation usedasByteBuffer().There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah I think this was left over from the previous Item
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question - byteArrayUnsafe doesn't copy. Since we're just passing this to our generator that doesn't modify the byte array, we don't need the copy.
I'll move this to the second optimization PR as well since its more related to those changes.