Skip to content
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

String decode using 'new String' is slow #1532

Closed
asfimport opened this issue Aug 20, 2014 · 2 comments
Closed

String decode using 'new String' is slow #1532

asfimport opened this issue Aug 20, 2014 · 2 comments

Comments

@asfimport
Copy link
Collaborator

asfimport commented Aug 20, 2014

There are three implementations of the Binary class and only one is using the faster 'UTF8.decode' in the 'toStringUsingUTF8' method. This fixes them to all use the faster UTF8.decode.

As noted in the comments, the 'new String' approach creates a new decoder each time, which is slower than the cached instance used by 'UTF8.decode'.

#1. ByteArraySliceBackedBinary <-- UTF8.decode
#2. ByteArrayBackedBinary <-- new String
#3. ByteBufferBackedBinary <-- new String

https://github.com/apache/incubator-parquet-mr/pull/40

Reporter: Daniel Weeks / @danielcweeks
Assignee: Daniel Weeks / @danielcweeks

Related issues:

Note: This issue was originally created as PARQUET-75. Please see the migration documentation for further details.

@asfimport
Copy link
Collaborator Author

@asfimport
Copy link
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant