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

Reduce CLI binary size #3576

Closed
alexec opened this issue Jul 23, 2020 · 5 comments · Fixed by #3614
Closed

Reduce CLI binary size #3576

alexec opened this issue Jul 23, 2020 · 5 comments · Fixed by #3614
Labels
type/feature Feature request
Projects

Comments

@alexec
Copy link
Contributor

alexec commented Jul 23, 2020

Summary

The CLIs binaries are getting bigger and bigger. We should compact them.

Motivation

So they are faster to download.

Proposal

  1. Strip debugging symbols.
  2. Use UPX - subject to LICENCE

https://dev.to/akshaybharambe14/guide-to-compress-golang-binaries-2d95


Message from the maintainers:

If you wish to see this enhancement implemented please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.

@alexec alexec added the type/feature Feature request label Jul 23, 2020
@alexec
Copy link
Contributor Author

alexec commented Jul 23, 2020

baseline:

-rwxr-xr-x  1 acollins8  staff    74M 23 Jul 15:09 argo-darwin-amd64
-rwxr-xr-x  1 acollins8  staff    74M 23 Jul 15:09 argo-linux-amd64
-rwxr-xr-x  1 acollins8  staff    71M 23 Jul 15:09 argo-linux-arm64
-rwxr-xr-x  1 acollins8  staff    72M 23 Jul 15:09 argo-linux-ppc64le
-rwxr-xr-x  1 acollins8  staff    74M 23 Jul 15:09 argo-linux-s390x
-rwxr-xr-x  1 acollins8  staff    74M 23 Jul 15:09 argo-windows-amd64

-s:

-rwxr-xr-x  1 acollins8  staff    74M 23 Jul 15:08 argo-darwin-amd64
-rwxr-xr-x  1 acollins8  staff    57M 23 Jul 15:07 argo-linux-amd64
-rwxr-xr-x  1 acollins8  staff    54M 23 Jul 15:07 argo-linux-arm64
-rwxr-xr-x  1 acollins8  staff    55M 23 Jul 15:08 argo-linux-ppc64le
-rwxr-xr-x  1 acollins8  staff    57M 23 Jul 15:08 argo-linux-s390x
-rwxr-xr-x  1 acollins8  staff    57M 23 Jul 15:08 argo-windows-amd64

-w -s

-rwxr-xr-x  1 acollins8  staff    63M 23 Jul 15:11 argo-darwin-amd64
-rwxr-xr-x  1 acollins8  staff    57M 23 Jul 15:11 argo-linux-amd64
-rwxr-xr-x  1 acollins8  staff    54M 23 Jul 15:11 argo-linux-arm64
-rwxr-xr-x  1 acollins8  staff    55M 23 Jul 15:11 argo-linux-ppc64le
-rwxr-xr-x  1 acollins8  staff    57M 23 Jul 15:11 argo-linux-s390x
-rwxr-xr-x  1 acollins8  staff    57M 23 Jul 15:11 argo-windows-amd64

presumable -s implies -w

upx:

-rwxr-xr-x  1 acollins8  staff    24M 23 Jul 15:19 argo-darwin-amd64
-rwxr-xr-x  1 acollins8  staff    23M 23 Jul 15:16 argo-linux-amd64
-rwxr-xr-x  1 acollins8  staff    21M 23 Jul 15:16 argo-linux-arm64
-rwxr-xr-x  1 acollins8  staff    21M 23 Jul 15:16 argo-linux-ppc64le
-rwxr-xr-x  1 acollins8  staff    57M 23 Jul 15:16 argo-linux-s390x
-rwxr-xr-x  1 acollins8  staff    23M 23 Jul 15:19 argo-windows-amd64

@alexec alexec added the backlog label Jul 27, 2020
@alexec alexec added this to To do in 2019-07-28 via automation Jul 27, 2020
@alexec
Copy link
Contributor Author

alexec commented Jul 27, 2020

Sneak into sprint.

alexec added a commit to alexec/argo-workflows that referenced this issue Jul 27, 2020
@alexec
Copy link
Contributor Author

alexec commented Jul 27, 2020

Why not just gzip the binaries?

@alexec
Copy link
Contributor Author

alexec commented Jul 28, 2020

gzip works well.

2019-07-28 automation moved this from To do to Done Jul 28, 2020
@alexec
Copy link
Contributor Author

alexec commented Sep 2, 2020

Available for testing in v2.11.0-rc1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature Feature request
Projects
No open projects
2019-07-28
  
Done
Development

Successfully merging a pull request may close this issue.

1 participant