-
Notifications
You must be signed in to change notification settings - Fork 13.3k
rustdoc disregards job limit #53143
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
Comments
This might be having a detrimental impact on our Travis builders as well so I've nominated, presumably the fix is relatively straightforward. |
Rustdoc runs the compilation as part of the test, and leaves coordination to the test runner - it doesn't synchronize anything on top of it. You can control the amount of concurrent tests with the $ cargo test --doc -- --test-threads 1 |
Rustdoc can't fix this on its end, cargo doesn't pass it the number of jobs:
Maybe cargo should pass through |
Has a cargo issue already been filed for this? |
See also rust-lang/cargo#10702 |
When running doctests (via
cargo doc
orcargo test
) rustdoc will compile each doctest separately, keeping a queue of compilation jobs. Maximum size of the queue seems to be limited to the number of CPUs in the system, but there seems to be no way to adjust that via command line or other configuration (--jobs N
is ignored, for example).This is particularly nasty on my laptop with 8 CPUs and only 8 GB of RAM that are quickly consumed by eight linkers running in parallel with all other stuff. Lying to rustdoc about CPU count by hooking sysconf() helps as a workaround, but this is hardly an elegant solution.
The text was updated successfully, but these errors were encountered: