-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Installing docs with x.py install
is very slow.
#80684
Comments
How long did you let the command run before killing it? I remember installing the docs taking a long time last time I did it. |
I left it for half an hour or so IIRC. I'll run it for longer and see if it goes away. How long do you think it should take to install on a modern SSD? |
I don't remember exactly how long it takes, but it doesn't depend on the speed of the disk.
|
The log file is empty, but I can see new files appearing on the disk (using |
It's been about 40 minutes now. It seems to be adding files to |
So it's just very slow. |
x.py install
hangs installing docs.x.py install
is very slow.
I took a look into this. The main issue is that the generated |
This issue is compounded on macOS, where it seems to be even more inefficient to launch lots of processes from a shell. Sorry I don't have timings, but it takes tens of minutes at least for this step [edit: over an hour]; long enough that I would expect most users who are trying to build our software from source in macOS (it's Zcash, which installs a pinned version of Rust in order to build) are likely to think it's hanging and give up. |
I think the problem may largely be that the manifest.in generated for rust-docs component (at least) is a file: list instead of using the directory: command; directory commands should be much more efficient. This change may be a recent(ish) regression; I suspect that fixing that is likely the right solution here. |
Oops I forgot to link back here: we discussed this briefly on Zulip and it was difficult to do in a cross-platform way. |
We solved our problem for Zcash by just not installing rust-docs (passing |
FYI, rust-lang/rust-installer#106 addresses this (not the underlying cause of the inefficiency but the majority of its extent). |
I bisected the underlying issue to c768ce1 “bootstrap: convert rust-docs to use Tarball” (#79788). Before this commit, rust-docs installs in half a second, and
After this commit, rust-docs installs in some twenty minutes, and
|
Proposed fix in #84289. (We should also do the optimization in rust-lang/rust-installer#106 of course.) |
…mulacrum bootstrap: Restore missing --bulk-dirs for rust-docs, rustc-docs The `--bulk-dirs` argument was removed for rust-docs in commit c768ce1 and rustc-docs in commit 8ca46fc (rust-lang#79788), presumably by mistake; that slowed down installation of rust-docs from under a second to some twenty *minutes*. Restoring `--bulk-dirs` reverses this slowdown. Fixes rust-lang#80684. Cc `@pietroalbini.`
Bug: https://bugs.gentoo.org/783468 X-Upstream-Issue: rust-lang/rust#80684 X-Upstream-Fix: rust-lang/rust#84289 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
CC @pietroalbini
On today's git (0cd459f)
x.py install
seems to get stuck if you are building docs.In
config.toml
:x.py install
will get stuck at:The underlying command is:
sh /home/vext01/source/rust/build/tmp/tarball/rust-docs/x86_64-unknown-linux-gnu/rust-docs-1.51.0-dev-x86_64-unknown-linux-gnu/install.sh --prefix=/home/vext01/source/rust/build/ykrustc-stage2-latest --sysconfdir=build/ykrustc-stage2-latest/etc --datadir=build/ykrustc-stage2-latest/share --docdir=build/ykrustc-stage2-latest/share/doc/rust --bindir=build/ykrustc-stage2-latest/bin --libdir=build/ykrustc-stage2-latest/lib --mandir=build/ykrustc-stage2-latest/share/man --disable-ldconfig
Adding this to the config seems to work around the hang:
Thanks!
The text was updated successfully, but these errors were encountered: