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-docs installation is very slow #87131

Closed
ChristianWilkie opened this issue Jul 13, 2021 · 13 comments
Closed

rust-docs installation is very slow #87131

ChristianWilkie opened this issue Jul 13, 2021 · 13 comments

Comments

@ChristianWilkie
Copy link

Describe the problem you are trying to solve
I'm new to Rust and was trying to install it on a Linux machine (user/non-root) by downloading the .tar.gz and using install.sh.

When it reached the part "install: installing component 'rust-docs'" I thought it hanged but it just took a few minutes.

Describe the solution you'd like
Not a big deal but just a suggestion - it might be good if there was a mention about it taking a while, maybe something like

"install: installing component 'rust-docs' (this may take a while)"

It would be even better if there was some form of progress indicator but probably that would be a lot more difficult

Notes
I also saw it mentioned in rust-lang/rustup#1540 - but this original issue was for Windows, not Linux

@kinnison
Copy link
Contributor

The tarball installer is not rustup so you're probably crossing wires a little. The https://github.com/rust-lang/rust repository is the originator of the tarball installers. In rustup we go to great lengths to parallelise unpacking in order to make the unpacking of the docs as fast as it can be -- sadly the rust-docs component contains nearly 20,000 files which no matter how fast your system will take a while to unpack simply due to the number of IO operations.

@pietroalbini Could you transfer this issue to the rust repo?

@ChristianWilkie
Copy link
Author

Ahh my apologies @kinnison , still totally new to Rust/don't know all of the components yet and just happened to see the other issue mentioned in this one

if it would be easier, I can close this + recreate it in the correct repo too. Not a big deal or anything just figured I'd mention it since it was a bit surprising as a new user to Rust

@kinnison
Copy link
Contributor

That's quite alright @ChristianWilkie - Most new users just use rustup since that's the mechanism we promote on the website, so I can understand the confusion. It's up to you if you'd rather wait for Pietro to get around to moving this, or you can just close it and open something fresh in the right place.

@pietroalbini pietroalbini transferred this issue from rust-lang/rustup Jul 14, 2021
@pietroalbini
Copy link
Member

Moved the issue.

@jyn514
Copy link
Member

jyn514 commented Jul 14, 2021

Hmm, this should have been fixed in #84289 - what version of rust are you installing? That fix landed in 1.53.

@ChristianWilkie
Copy link
Author

@jyn514 oh jeez, you're absolutely right. I thought I had the latest but I grabbed 1.50 by mistake. Retried with 1.53 and it's golden. Thank you :)

@jyn514 jyn514 closed this as completed Jul 14, 2021
@rafrafek
Copy link

Download is super slow, compare rustc 40.7 MiB/s with rust-docs 59.2 KiB/s:

obraz

@rafrafek
Copy link

Still super slow for 1.61.0

obraz

@kinnison
Copy link
Contributor

@rafrafek you are comparing download speed vs. install speed. rust-docs is a very IO operation heavy component because it contains tens of thousands of small files. If you happen to have a virus scanner which is getting in the way of the unpacker then this can cause the slowdown you are experiencing.

@rafrafek
Copy link

@kinnison not sure, it says installing, looks like downloading

@kinnison
Copy link
Contributor

@rafrafek we use the same progress-bar code for both codepaths. Believe me, that's installing.

@rafrafek
Copy link

@kinnison ok, understandable, thanks!

@kinnison
Copy link
Contributor

@rafrafek Your best bet is to see if you have a virus scanner, and if so to tell it to either ignore the rust toolchain directory, or at least to set it to scan-on-first-use rather than scan-on-create.

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

5 participants