-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
HBASE-28485: Re-use ZstdDecompressCtx/ZstdCompressCtx for performance #5797
HBASE-28485: Re-use ZstdDecompressCtx/ZstdCompressCtx for performance #5797
Conversation
0afdd33
to
b066af9
Compare
b066af9
to
93fb37f
Compare
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
if (dict != null) { | ||
ctx.loadDict(dict); | ||
} else { | ||
// loadDict((byte[]) accepts null to clear the dictionary |
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.
Did not know this was possible. Nice optimization.
A note for any other reviewers. The difference between failed precommit runs and successful ones is d6843d3 . |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
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.
Nice find.
…pache#5797) Co-authored-by: Charles Connell <cconnell@hubspot.com> Signed-off-by: Andrew Purtell <apurtell@apache.org> Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
…pache#5797) Co-authored-by: Charles Connell <cconnell@hubspot.com> Signed-off-by: Andrew Purtell <apurtell@apache.org> Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
…pache#5797) Co-authored-by: Charles Connell <cconnell@hubspot.com> Signed-off-by: Andrew Purtell <apurtell@apache.org> Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
…pache#5797) Co-authored-by: Charles Connell <cconnell@hubspot.com> Signed-off-by: Andrew Purtell <apurtell@apache.org> Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
…5797) Co-authored-by: Charles Connell <cconnell@hubspot.com> Signed-off-by: Andrew Purtell <apurtell@apache.org> Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
…5797) Co-authored-by: Charles Connell <cconnell@hubspot.com> Signed-off-by: Andrew Purtell <apurtell@apache.org> Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
…5797) Co-authored-by: Charles Connell <cconnell@hubspot.com> Signed-off-by: Andrew Purtell <apurtell@apache.org> Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
…5797) Co-authored-by: Charles Connell <cconnell@hubspot.com> Signed-off-by: Andrew Purtell <apurtell@apache.org> Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
…pache#5797) Co-authored-by: Charles Connell <cconnell@hubspot.com> Signed-off-by: Andrew Purtell <apurtell@apache.org> Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
The zstd documentation recommends re-using context objects when possible, because their creation has some expense. They can be more cheaply reset than re-created. In this PR, create one
Zstd(De)compressCtx
for the lifetime of aCompressor
orDecompressor
object.