Skip to content
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

consider using libdeflate instead of libzlib #5131

Closed
mvrhov opened this issue Nov 27, 2018 · 8 comments
Closed

consider using libdeflate instead of libzlib #5131

mvrhov opened this issue Nov 27, 2018 · 8 comments
Assignees
Labels
design proposal Needs design doc/proposal before implementation stale stalebot believes this issue/PR has not been touched recently

Comments

@mvrhov
Copy link

mvrhov commented Nov 27, 2018

Issue Template

Title: libdeflate, faster zlib replacement

Description:
libdeflate is supposed to be a faster & offer better compression at the same level alternative to zlib, it also offers more compression levels, which is not necessary here, while retaining the decompression compatibility.
Unfortunately it's api is not compatible with the one from zlib

[optional Relevant Links:]
https://github.com/ebiggers/libdeflate

@mvrhov mvrhov changed the title libdeflate instead of libzlib consider using libdeflate instead of libzlib Nov 27, 2018
@htuch htuch added the design proposal Needs design doc/proposal before implementation label Nov 27, 2018
@htuch
Copy link
Member

htuch commented Nov 27, 2018

@gsagula WDYT?

@gsagula
Copy link
Member

gsagula commented Nov 27, 2018

I don't know much about libdeflate, but considering that zlib project has not been very active lately and IIRC it still has an open issue with the size of sliding window, I would look into alternatives.
I'm working on #4445, a generic compression filter that will make it easier to plug other compression libraries. We could try it out when I finish it.

@mvrhov Did you benchmark it yourself? I couldn't find a comparison in there project, other than statements saying that it is faster.

@mvrhov
Copy link
Author

mvrhov commented Nov 27, 2018

We haven't had time to test it yet. However for as is it more important in having smaller file size because we store a lot of xml and json data gzipped, that the browsers can still decompress than the speed.

@gsagula
Copy link
Member

gsagula commented Nov 27, 2018

IMO, If performance is the reason for changing this library, we need to make sure that the replacement will produce better results before doing any work. WDYT? Another thing that we need to consider here is that Envoy, in order to reduce latency, it flushes on every data frame which sacrifices the compression a bit. It seems that for your use-case, the compression engine should be doing the opposite.

@mvrhov
Copy link
Author

mvrhov commented Nov 28, 2018

I agree with what have you written. My answer might not have been clear enough. We store the gzipped files on disk and then ATM we configure the nginx to serve them as is.
As we are in a process of redesigning some of the infrastructure I've discovered the above mentioned libdeflate and also the envoy

@gsagula
Copy link
Member

gsagula commented Nov 28, 2018

Thanks for elaborating it. I'm not sure that Envoy can serve static files yet. There is an open issue for that #378.

@stale
Copy link

stale bot commented Dec 28, 2018

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.

@stale stale bot added the stale stalebot believes this issue/PR has not been touched recently label Dec 28, 2018
@stale
Copy link

stale bot commented Jan 4, 2019

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions.

@stale stale bot closed this as completed Jan 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design proposal Needs design doc/proposal before implementation stale stalebot believes this issue/PR has not been touched recently
Projects
None yet
Development

No branches or pull requests

3 participants