-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Is it really faster than Codecutils?? #2955
Comments
tmdgusya
added
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
labels
Mar 30, 2023
@tmdgusya what is the ask here? |
debora-ito
added
response-requested
Waiting on additional info or feedback. Will move to "closing-soon" in 5 days.
and removed
needs-triage
This issue or PR still needs to be triaged.
labels
Mar 30, 2023
public static String encodeAsString(byte... bytes) {
if (bytes == null) {
return null;
}
if (isJaxbAvailable) {
try {
return DatatypeConverter.printBase64Binary(bytes);
} catch (NullPointerException ex) {
// https://netbeans.org/bugzilla/show_bug.cgi?id=224923
// https://issues.apache.org/jira/browse/CAMEL-4893
// Note the converter should eventually be initialized and printBase64Binary should start working again
LOG.debug("Recovering from JAXB bug: https://netbeans.org/bugzilla/show_bug.cgi?id=224923", ex);
}
}
return bytes.length == 0 ? "" : CodecUtils.toStringDirect(codec.encode(bytes));
} High performant(DataTypeConverter) According to the comment in this file, DataTypeConverter should be faster than CodecUtils. |
github-actions
bot
removed
the
response-requested
Waiting on additional info or feedback. Will move to "closing-soon" in 5 days.
label
Mar 31, 2023
@tmdgusya did you check that in a multi-threaded environment? |
No, I didn't |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
https://github.com/aws/aws-sdk-java/blob/8542b3ddc6be843dc910b3ccb1e6aeb3cc05c001/aws-java-sdk-core/src/main/java/com/amazonaws/util/Base64.java
In Base64 files, you described that if you don't use
JAXB
, then will fallback to SDK implementation which may be less performant. So, I tested this. I tested which is the faster one between CodecUtils and DataTypeConverter. As described comment on function, DataTypeConverter should be faster than CodecUtils. But, DataTypeConverter always slower than CodecUtils.Expected Behavior
DataTypeCoverter is better than CodecUtils. (But Always lose)
Current Behavior
DataTypeCoverter is always slower than CodecUtils.
Reproduction Steps
Possible Solution
No response
Additional Information/Context
AWS Java SDK version used
1.12.174
JDK version used
17
Operating System and version
macOS monterey 12.6 (21G115) M1Max Memory: 32GB
The text was updated successfully, but these errors were encountered: