-
Notifications
You must be signed in to change notification settings - Fork 77
[DE-716] Compression of requests and responses #328
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
Conversation
@@ -33,7 +38,7 @@ def default_serializer(x: Any) -> str: | |||
:return: The object serialized as a JSON string | |||
:rtype: str | |||
""" | |||
return dumps(x) | |||
return dumps(x, separators=(",", ":")) |
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.
Small optimization, eliminates whitespace from the JSON structure.
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #328 +/- ##
=======================================
Coverage 98.01% 98.02%
=======================================
Files 26 26
Lines 4231 4252 +21
=======================================
+ Hits 4147 4168 +21
Misses 84 84 ☔ View full report in Codecov by Sentry. |
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.
lgtm!
Adding compression of requests and responses, as implemented in arangodb/arangodb#20128
By default compression is turned off, so this change has no effect unless the user specifies one of the newly introduced parameters.
The
ArangoClient
gets two optional parameters:request_compression
- Represents the compression strategy,None
by default. The reason for passing in an object instead of a string (such as deflate) is to allow the client to fine tune the compression algorithm.response_compression
- The equivalent of anAccept-Encoding
string. This has no effect unless the server is configured to use encoding.A new documentation page has been added specifically for guiding users on how to use compression.