-
Notifications
You must be signed in to change notification settings - Fork 27
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
add ZStandard compression #45
Conversation
I got a little scared by their multiple warnings about thread safety...
and as you probably want to have multiple thread on your webserver... pyzstd is not warning about potential thread issues... but I admit it does not imply that there are no such issues... |
AFAICT, regarding the warning:
Even if flask-compress is used in a threaded context, only a single thread will ever process a single response, so as long as the So in a nutshell, looking at the
For context, there is relevant information regarding the various zstd implementations here. |
Yes. Ok.
Would it also work to store the object once for good in self ? elif algorithm == 'zstd':
if self.zstd is None:
self.zstd = zstandard.ZstdCompressor(level=app.config['COMPRESS_ZSTD_LEVEL'])
return self.zstd.compress(response.get_data()) |
As the I did some tests on my not-so-recent hardware, and I measure the creation time of |
Ok. I'll fix it as you suggested then. |
This pre-commit check is not part of the workflow file, so I think this must be something enabled at org level. @KelSolaar @MichaelMauderer perhaps you may help (I pinged you as I think you have the admin rights) |
Thanks a lot! I will release soon. |
No description provided.