rework gateway compression#2000
Merged
Merged
Conversation
VelvetToroyashi
approved these changes
Dec 10, 2024
VelvetToroyashi
left a comment
Member
There was a problem hiding this comment.
I've only briefly looked over it - I do have questions (e.g. the payload decompressor seemingly being added twice?) but nothing blocking.
OoLunar
approved these changes
Dec 16, 2024
DPlayer234
reviewed
Dec 16, 2024
Plerx2493
approved these changes
Dec 19, 2024
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.
This pull request completely rewrites how gateway compression works and adds zstd support. Previously, gateway compression went through a PayloadDecompressor pulling the current compression mode from the configuration; now we register a different compression service based on the determined compression mode. This supports a default selection as outlined in the new documentation; attempting to load zstd and falling back to zlib if zstd is unavailable.
This pull request improves zlib performance somewhat, especially zlib-payload (which is no longer a default-recommended option due to its many shortcomings as payload-wise decompression). Zstd performs considerably better due to not needing to copy memory or make temporary allocations beyond what the native implementation requires.
closes #2015