-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
"x.py check" that does nothing feels like it has gotten slower #133162
Comments
It takes ~1s on my laptop. Have you tried running |
That does help quite a bit, thanks for the hint:
Still, ~68% of the runtime of this command are spent in bootstrap, not in cargo. |
Could you please generate a flamegraph of this invocation? There is a |
gc doesn't run for submodules, you'll have have to do |
That doesn't really change anything.
|
Gathering the perf trace is easy, but now it's already been 10 minutes and it's still not produced a flamegraph from that... how long of a wait is normal here? It seems like it's spawning thousands of addr2line processes (and it's entirely sequential, most of my CPU cores are idle). |
Oh, yes, this is a super annoying performance bug with |
Those issues were fixed years ago (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=be8ecc57f180415e8a7c1cc5620c5236be2a7e56), there must be something else going on I think? |
Oh yeah, with gimli's addr2line this finishes basically immediately. Wtf? |
Github adds CSP headers that disable javascript in the SVG, that disables some interactive effects in the flamegraph. So one has to download the file and then open it. Comparing it to my system yours spends more time in |
Ah, good point, I have cargo overriden there to test #132390 🤦 Sorry for that! Using the bootstrap cargo speeds things up a lot:
OTOH now >80% of the time are spent inside bootstrap. Here's a new flamegraph: |
Interestingly the flamegraph says most of the time is spent in cargo. That's odd, it doesn't add up with the times that are printed on the terminal. Or is that all time spent dynamically linking and launching cargo, before cargo's own time measurements begin? Anyway, around 1s for a NOP |
Looks like now most of the time is spent inside Cargo, it's just not obvious from the stderr log. I think that bootstrap invokes Cargo many more times than just the two invocations shown in stderr, and it swallows the output (for good reasons, otherwise it would be super spammy). |
Ah, that makes sense. Makes me wonder if it can be reduced, but then again, it's not adding up to a whole lot -- 1s feels a lot faster than 5s. |
So, there's no recent slowdown here. :) |
When working on the UI test suite, it is common to hit Ctrl-S in the IDE and then quickly switch to a terminal to run the test. Since RA triggers a check-on-save, this means that the tests can only start running once the check-build is completed. However, since nothing in the compiler changed, this check-build should be completed very quickly.
However, some time recently this seems to have gotten significantly slower. I now usually have to wait for multiple seconds before a test build can start, which was not the case in the past. This is on a system with an NVMe SSD and a pretty good CPU (pretty good for a laptop, anyway) -- it should be plenty fast enough for this.
To reproduce, run
./x check compiler
, wait until it is completed, and then runtime ./x check compiler
. The result is:As you can see, there are less than 2s spent inside cargo. And yet overall this took more than 5s. This means that bootstrap spent 3s doing... something? Whatever it did takes two times longer than cargo took to verify that the entire compiler sources remain unchanged.
Would be nice to find a way to speed that up. :)
Cc @rust-lang/bootstrap
The text was updated successfully, but these errors were encountered: