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

Concerns about dependency size #12

Open
bojanz opened this issue Jun 27, 2020 · 0 comments
Open

Concerns about dependency size #12

bojanz opened this issue Jun 27, 2020 · 0 comments

Comments

@bojanz
Copy link

bojanz commented Jun 27, 2020

This package uses https://github.com/andybalholm/brotli to handle the actual compression. This package has 260 thousand lines of code:

❯ gocloc brotli
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Go                              61           2451           1941         252967
Plain Text                       1            815              0           8471
Markdown                         1              1              0              4
-------------------------------------------------------------------------------
TOTAL                           63           3267           1941         261442
-------------------------------------------------------------------------------

Almost none of that are tests, so all of that code is getting compiled in. In my testing adding this package increases my binary size by about 5.5mb. In comparison, github.com/klauspost/compress/zstd is 10 thousand lines of code with tests, and only adds about 700kb to the binary.

I'm afraid that the increase in binary size due to https://github.com/andybalholm/brotli offsets the gains made by better compression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant