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

fix: update rpmpack and change default compressor to gzip:-1 (a default level) instead of gzip:9 #458

Merged
merged 2 commits into from
Feb 13, 2022

Conversation

Felixoid
Copy link
Contributor

The default compression level for rpm is 9. https://github.com/google/rpmpack/blob/master/rpm.go#L165

Because of it, rpm packaging is significantly slower than deb, almost 5 times worse.

Here I bump the dependencies, add tests and change default level to -1

@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 12, 2022
@codecov
Copy link

codecov bot commented Feb 12, 2022

Codecov Report

Merging #458 (0fc8f23) into main (6aaec21) will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #458      +/-   ##
==========================================
+ Coverage   65.93%   65.98%   +0.05%     
==========================================
  Files          16       16              
  Lines        1905     1908       +3     
==========================================
+ Hits         1256     1259       +3     
  Misses        510      510              
  Partials      139      139              
Impacted Files Coverage Δ
nfpm.go 86.43% <ø> (ø)
rpm/rpm.go 69.40% <100.00%> (+0.34%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6aaec21...0fc8f23. Read the comment docs.

@caarlos0
Copy link
Member

I think we can leave the default as 9, and users who feel it is too slow can change it. WDYT?

@Felixoid
Copy link
Contributor Author

Felixoid commented Feb 13, 2022

The difference between 5 and 9 levels in speed is huge, 1.5 vs 7.5 minutes, and only 5% in space, difficult to recall exact numbers, something like 1015MB vs 970MB. I'd say, 9 is rather worthless.

9 is defined by rpmpack, and for deb and apk -1 is used. So now all packages are compressing with the same settings.

@caarlos0 caarlos0 added the enhancement New feature or request label Feb 13, 2022
@caarlos0
Copy link
Member

9 is rather worthless.

well, that depends entirely in the use case of the package, some people may need those 5% shrink for some reason.

9 is defined by rpmpack, and for deb and apk -1 is used.

then yes, this makes sense.

@caarlos0 caarlos0 merged commit 96c7b1f into goreleaser:main Feb 13, 2022
@caarlos0
Copy link
Member

thanks!

@github-actions github-actions bot added this to the 2.12.0 milestone Feb 13, 2022
@Felixoid
Copy link
Contributor Author

Thank you for reviewing!

BTW, the bot just added 2.12.0 milestone. Looks like something wrong since 2.13 is released.

@caarlos0 caarlos0 modified the milestones: 2.12.0, 2.13.0 Feb 13, 2022
@caarlos0
Copy link
Member

thanks, fixed it @Felixoid

@Felixoid Felixoid deleted the bump-rpm branch February 13, 2022 17:17
@caarlos0 caarlos0 modified the milestones: 2.13.0, 2.14.0 Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants