-
Couldn't load subscription status.
- Fork 3.4k
HBASE-28485: Re-use ZstdDecompressCtx/ZstdCompressCtx for performance #5797
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
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 <[email protected]> Signed-off-by: Andrew Purtell <[email protected]> Signed-off-by: Nick Dimiduk <[email protected]>
…pache#5797) Co-authored-by: Charles Connell <[email protected]> Signed-off-by: Andrew Purtell <[email protected]> Signed-off-by: Nick Dimiduk <[email protected]>
…pache#5797) Co-authored-by: Charles Connell <[email protected]> Signed-off-by: Andrew Purtell <[email protected]> Signed-off-by: Nick Dimiduk <[email protected]>
…pache#5797) Co-authored-by: Charles Connell <[email protected]> Signed-off-by: Andrew Purtell <[email protected]> Signed-off-by: Nick Dimiduk <[email protected]>
…5797) Co-authored-by: Charles Connell <[email protected]> Signed-off-by: Andrew Purtell <[email protected]> Signed-off-by: Nick Dimiduk <[email protected]>
…5797) Co-authored-by: Charles Connell <[email protected]> Signed-off-by: Andrew Purtell <[email protected]> Signed-off-by: Nick Dimiduk <[email protected]>
…5797) Co-authored-by: Charles Connell <[email protected]> Signed-off-by: Andrew Purtell <[email protected]> Signed-off-by: Nick Dimiduk <[email protected]>
…5797) Co-authored-by: Charles Connell <[email protected]> Signed-off-by: Andrew Purtell <[email protected]> Signed-off-by: Nick Dimiduk <[email protected]>
…pache#5797) Co-authored-by: Charles Connell <[email protected]> Signed-off-by: Andrew Purtell <[email protected]> Signed-off-by: Nick Dimiduk <[email protected]>
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)compressCtxfor the lifetime of aCompressororDecompressorobject.