Various performance improvements#3175
Merged
Merged
Conversation
millems
approved these changes
Apr 28, 2022
Comment on lines
+59
to
+72
| String placeholder = "not available"; | ||
| String prefix = "Received " + (response.isSuccessful() ? "successful" : "failed") + | ||
| " response: "; | ||
| StringJoiner details = new StringJoiner(", ", prefix, ""); | ||
| details.add("Status Code: " + response.statusCode()); | ||
| String requestId = SdkHttpUtils.firstMatchingHeaderFromCollection(response.headers(), | ||
| X_AMZN_REQUEST_ID_HEADERS) | ||
| .orElse(placeholder); | ||
|
|
||
| details.add("Request ID: " + requestId); | ||
|
|
||
| response.firstMatchingHeader(X_AMZ_ID_2_HEADER).ifPresent(extendedRequestId -> | ||
| details.add("Extended Request ID: " + extendedRequestId)); | ||
| return details.toString(); |
Contributor
There was a problem hiding this comment.
While we're worrying about efficiency, should we just use StringBuilder? This feels hard to read with StringJoiner.
Comment on lines
+50
to
+53
| if (!VALUE_MAP.containsKey(normalizedValue)) { | ||
| throw new IllegalArgumentException("The provided value is not a valid algorithm " + value); | ||
| } | ||
| return VALUE_MAP.get(normalizedValue); |
Contributor
There was a problem hiding this comment.
Since we're being picky about performance, should we just do a get and check to see if the result is null? (I don't think we need null to be a valid algorithm)
cenedhryn
approved these changes
Apr 29, 2022
|
Kudos, SonarCloud Quality Gate passed! |
millems
pushed a commit
that referenced
this pull request
May 4, 2022
* Various performance improvements * Address feedback and fix failed unit test * Fix test
chibenwa
added a commit
to chibenwa/james-project
that referenced
this pull request
May 13, 2022
S3 team had been, partly on our reports [1] working on numerous performance enhancements [2] [3] that Apache James IMAP workload would definitely benefit from. [1] aws/aws-sdk-java-v2#3162 [2] aws/aws-sdk-java-v2#3175 [3] aws/aws-sdk-java-v2#3178 Upgrade
chibenwa
added a commit
to apache/james-project
that referenced
this pull request
May 24, 2022
S3 team had been, partly on our reports [1] working on numerous performance enhancements [2] [3] that Apache James IMAP workload would definitely benefit from. [1] aws/aws-sdk-java-v2#3162 [2] aws/aws-sdk-java-v2#3175 [3] aws/aws-sdk-java-v2#3178
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.








Motivation and Context
Modifications
Various performance improvements