-
Notifications
You must be signed in to change notification settings - Fork 892
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
rustc --print sysroot can be slow #783
Comments
Not that |
This only happens on the first execution of rustup, so it's likely related to disk access which is then being cached for later executions. While I can't reproduce it taking 3 seconds to run, it is noticeably slower on that first run. These are the minimum steps that need to happen:
There are a few factors that might contribute to slowness, not all of which can be improved easily:
Hopefully it's the last one, in which case it should be fairly easy to track down with |
Ok I did a After you can find all command's output but from what I can understand just follow two lines mater:
What it really mean is over my understanding... 😄 All Output
|
That would seem to indicate that the real |
How can I check it? |
@la10736 this sounds fishy! Could you try passing |
@alexcrichton : I did it
Another strange thing is that the execution time go from 1.5 to 4.5 seconds (every time I did it after a reboot). |
8624: Automatically detect rust library source file map r=vsrs a=vsrs This PR adds a new possible `rust-analyzer.debug.sourceFileMap` value: ```json { "rust-analyzer.debug.sourceFileMap": "auto" } ``` I did not make it the default because it uses two shell calls (`rustc --print sysroot` and `rustc -V -v`). First one can be slow (rust-lang/rustup#783) Fixes #8619 Co-authored-by: vsrs <vit@conrlab.com>
Hi!
Looks like sometimes
rustc --print sysroot
can take as long as three seconds to complete. I think this a bit too much, and I suppose that rustup is to blame. See intellij-rust/intellij-rust#754 (comment) for example of this issue. We've raised timeout to five seconds in IntelliJ Rust, so this shouldn't be a problem, but it seems fishy anyway!Many thanks to @la10736 for investigating this issue!
The text was updated successfully, but these errors were encountered: