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

Rust platform size (round 2) #65296

Closed
ghost opened this issue Oct 11, 2019 · 8 comments
Closed

Rust platform size (round 2) #65296

ghost opened this issue Oct 11, 2019 · 8 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. I-heavy Issue: Problems and improvements with respect to binary size of generated code. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@ghost
Copy link

ghost commented Oct 11, 2019

Reopening this issue as its not fixed. On my last post in July the size was
294 MB:

#61978 (comment)

comically, its actually larger now at 347 MB:

https://static.rust-lang.org/dist/rust-nightly-x86_64-pc-windows-gnu.msi

This was referenced Oct 11, 2019
@memoryruins
Copy link
Contributor

memoryruins commented Oct 11, 2019

The installer's origin states it was created on 10/10/2019 6:48 PM, which is hours before #64823 merged. The artifact sizes of that PR match up with its description. Check on it again tomorrow?

@matthiaskrgr
Copy link
Member

Hi, using the master toolchain https://github.com/kennytm/rustup-toolchain-install-master I can confirm that it downloads
65.83 MB rustc-nightly-x86_64-unknown-linux-gnu.tar.xz
and
17.59 MB rust-std-nightly-x86_64-unknown-linux-gnu.tar.xz
now (the latter was around 10 times that previously).

@est31
Copy link
Member

est31 commented Oct 11, 2019

To give a table like #61978 (comment) :

file name dbeed58 (prior to #59800 merge) 898f36c (prior to #64823 merge) 000d90b (after #64823 merge)
rustc-nightly-x86_64-unknown-linux-gnu.tar.gz 122 073 207 101 219 999 101 214 839
rust-std-nightly-x86_64-unknown-linux-gnu.tar.gz 82 951 040 215 628 828 25 056 035
cargo-nightly-x86_64-unknown-linux-gnu.tar.gz 6 751 312 6 827 556 6 834 296
rustc-nightly-x86_64-pc-windows-msvc.tar.gz 82 391 063 61 214 933 61 228 366
rust-std-nightly-x86_64-pc-windows-msvc.tar.gz 74 663 690 222 313 575 20 421 375
cargo-nightly-x86_64-pc-windows-msvc.tar.gz 4 450 362 4 526 714 4 528 683

Created by the commands (with some manual formatting afterwards):

export TOOLS="rustc-nightly-x86_64-unknown-linux-gnu.tar.gz rust-std-nightly-x86_64-unknown-linux-gnu.tar.gz cargo-nightly-x86_64-unknown-linux-gnu.tar.gz rustc-nightly-x86_64-pc-windows-msvc.tar.gz rust-std-nightly-x86_64-pc-windows-msvc.tar.gz cargo-nightly-x86_64-pc-windows-msvc.tar.gz"

for TOOL in $TOOLS; do printf "| $TOOL |"; for COMMIT in 898f36c83cc28d7921a1d7b3605323dc5cfcf533 000d90b11f7be70ffb7812680f7abc6deb52ec88; do curl -I -s https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rustc-builds/${COMMIT}/${TOOL} | rg Content-Length | tr -d '\r' | tr -d '\n' | sed 's/.*: //;s/\(.*\)/ \1 |/'; done; echo ; done

So we had some really nice reductions thanks to #64823, even if you compare with the state before #59800.

@est31
Copy link
Member

est31 commented Oct 11, 2019

@cup rust-nightly-x86_64-pc-windows-gnu.msi as of commit 000d90b is now only 170M. So definitely a reduction here.

@nagisa
Copy link
Member

nagisa commented Oct 11, 2019

Closing as per investigation above.

@nagisa nagisa closed this as completed Oct 11, 2019
@est31
Copy link
Member

est31 commented Oct 11, 2019

@nagisa rust has still the largest package of the list in the original issue #61978 (comment) . The regression (that appeared after that original bug was filed) is fixed now, but it would still be cool to reduce the platform size even further.

E.g. #65251 will mean another improvement. In the 1.38 package, librustc_codegen_llvm-emscripten.so takes 36.7 MB uncompressed and (if my measurement method doesn't lie) 14 MB compressed.

@nagisa nagisa reopened this Oct 11, 2019
@Alexendoo Alexendoo added C-enhancement Category: An issue proposing an enhancement or a PR with one. I-heavy Issue: Problems and improvements with respect to binary size of generated code. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 16, 2019
@ghost
Copy link
Author

ghost commented Nov 16, 2019

I am going to close this as I feel it has been fixed in spirit. Current size is
162 MB which is a 20% reduction from the "round 1" issue size. If someone has a good case for why it should be reduced further they can open their own issue, thanks.

@ghost ghost closed this as completed Nov 16, 2019
@est31
Copy link
Member

est31 commented Nov 16, 2019

To give a table for the artifact size impact of #65251 and #65501:

file name 7e49800 (prior to #65251 merge) a16dca3 (after #65251 merge) 6576f4b (prior to #65501 merge) 50ffa79 (after #65501 merge)
rustc-nightly-x86_64-unknown-linux-gnu.tar.gz 101217050 101236266 101985671 87758170
rust-std-nightly-x86_64-unknown-linux-gnu.tar.gz 215762860 215737742 222905600 222842202
cargo-nightly-x86_64-unknown-linux-gnu.tar.gz 6886595 6883817 6892313 6892440
rustc-nightly-x86_64-pc-windows-msvc.tar.gz 61249346 61241322 61724620 54205791
rust-std-nightly-x86_64-pc-windows-msvc.tar.gz 222779885 222664788 231804265 231808229
cargo-nightly-x86_64-pc-windows-msvc.tar.gz 4574938 4575259 4566405 4580389

So it seems that #65501 was the actual PR that removed the extra LLVM copy.

Edit: script used:

export TOOLS="rustc-nightly-x86_64-unknown-linux-gnu.tar.gz rust-std-nightly-x86_64-unknown-linux-gnu.tar.gz cargo-nightly-x86_64-unknown-linux-gnu.tar.gz rustc-nightly-x86_64-pc-windows-msvc.tar.gz rust-std-nightly-x86_64-pc-windows-msvc.tar.gz cargo-nightly-x86_64-pc-windows-msvc.tar.gz"

for TOOL in $TOOLS; do printf "| $TOOL |"; for COMMIT in 7e498005a12548a8fd396312affde05c4d3ca085 a16dca337de610986252bb800953e57bf395863f 6576f4be5af31a5e61dfc0cf50b7130e6c6dfb35 50ffa79589600f515ff2710830c23cd2dce7cb76; do curl -I -s https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rustc-builds/${COMMIT}/${TOOL} | rg Content-Length | tr -d '\r' | tr -d '\n' | sed 's/.*: //;s/\(.*\)/ \1 |/'; done; echo ; done

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. I-heavy Issue: Problems and improvements with respect to binary size of generated code. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants