Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upMassive compiler perf regression #31157
Comments
Gankro
added
I-slow
A-compiler
labels
Jan 24, 2016
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
+1 on this (for reference output of
The issue he mentioned is #22204. This (current) may be considered duplicate of that, though, again, the problem was not of the current magnitude. The author considers boxing to help:
But, once again, it doesn't help much now. |
This comment has been minimized.
This comment has been minimized.
|
Ah, as well, this may be considered as a regression from stable to beta: |
sfackler
added
I-nominated
T-compiler
labels
Jan 24, 2016
This comment has been minimized.
This comment has been minimized.
|
Note that the obligation forest PR was merged on January 16, so it did get merged in the window in which the regression happened. |
This comment has been minimized.
This comment has been minimized.
|
Seems pretty likely to have to do with the obligation forest and also with the change in caching behavior that accompanied it. I can investigate some. |
This comment has been minimized.
This comment has been minimized.
MagaTailor
commented
Jan 24, 2016
|
Is the syntax_syntex issue related? It was always bad but now it's definitely worse. |
This comment has been minimized.
This comment has been minimized.
|
I can certainly confirm that this is traits-related; at least, the crate in question spends about 85% of its compilation time in |
This comment has been minimized.
This comment has been minimized.
|
@petevine unlikely to be related to that, but I don't know |
This comment has been minimized.
This comment has been minimized.
|
Seems pretty clear that the caching of sized results is no longer kicking in like it once did. This probably affects the script crate from servo too. |
This comment has been minimized.
This comment has been minimized.
|
e.g., we repeatedly prove that
|
This comment has been minimized.
This comment has been minimized.
|
triage: P-high |
rust-highfive
added
P-high
and removed
I-nominated
labels
Jan 28, 2016
nikomatsakis
referenced this issue
Jan 29, 2016
Closed
Add snapshotting to ObligationForest, take 2 #31175
nikomatsakis
referenced this issue
Feb 1, 2016
Merged
Add a per-tree cache into the obligation forest #31349
nrc
assigned
nikomatsakis
Feb 4, 2016
bors
added a commit
that referenced
this issue
Feb 5, 2016
bors
closed this
in
#31349
Feb 5, 2016
This comment has been minimized.
This comment has been minimized.
|
So, as this was fixed -- is it (the fix) going to be in the next nightly? |
This comment has been minimized.
This comment has been minimized.
|
Ought to be, yes. On Fri, Feb 5, 2016 at 3:25 PM, Oak notifications@github.com wrote:
|
This comment has been minimized.
This comment has been minimized.
|
@nikomatsakis excuse me for bothering again.
|
This comment has been minimized.
This comment has been minimized.
Good point. I've nominated the PR for backporting.
It may be possible to improve further. |
This comment has been minimized.
This comment has been minimized.
|
Is there any work done towards improving this further? |
This comment has been minimized.
This comment has been minimized.
|
@Marwes it is not backported to beta yet. |
This comment has been minimized.
This comment has been minimized.
|
That travis link shows a regression in Edit: Ok, that's lopsided since nightly runs benchmarking and things. I guess those timings are not usable. |
This comment has been minimized.
This comment has been minimized.
|
Here is a link to a build before the regression so there is still a significant slowdown. And even on nightly it fails occasionally https://travis-ci.org/Marwes/combine/jobs/109742755. |
nikomatsakis
reopened this
Feb 18, 2016
This comment has been minimized.
This comment has been minimized.
|
I'm willing to re-open the issue on the basis that there is still ground to get back, even if the worst part is solved. |
This comment has been minimized.
This comment has been minimized.
|
triage: P-medium |
rust-highfive
added
P-medium
and removed
P-high
labels
Feb 18, 2016
This comment has been minimized.
This comment has been minimized.
|
However, I'm bumping priority to medium. |
sanxiyn
added
I-compiletime
and removed
I-slow
labels
Mar 23, 2016
This comment has been minimized.
This comment has been minimized.
|
Needs to be retested and a test case added to perf.rlo cc @nrc @Mark-Simulacrum. |
This comment has been minimized.
This comment has been minimized.
|
Will add test case to perf.rlo later, but currently time -v yields:
So I think this issue can be considered fixed. Can someone clarify exactly what part of the compiler was being stressed? I can add this crate to perf.rlo no problem, but perhaps something better can be designed? |
This comment has been minimized.
This comment has been minimized.
|
I've reported this originally, and now I experience the same values as @Mark-Simulacrum. I've tested it with several nightlies over the year, and it seems it was getting better and better (from original 30 secs to 20, 15, 12 and finally 10 as of today). Feels great. Thanks to the rust team for the effort put on compiling speed optimizations! This exact issue with the example crate may be closed as solved, however the original drop in performance was caused by the introduction of Edit: Actually, the crate itself takes only 5 seconds to build, which is awesome. |
White-Oak
referenced this issue
Oct 24, 2016
Merged
Added a proper support for `cargo --message-format json` #84
steveklabnik
removed
the
A-compiler
label
Mar 24, 2017
This comment has been minimized.
This comment has been minimized.
|
Closing in favor of rust-lang-deprecated/rustc-perf-collector#2 which tracks adding a test for this. |
Gankro commentedJan 24, 2016
First reported on Reddit here. See that post for more details and examples.
This crate has gone from a build time of 17 seconds with the compiler consuming 168MB of RAM at peak to 320 secs and 1670MB. Apparently this regression occurred somewhere between jan 15-18, and is in the current beta. The author hypothesizes that it may have to do with complex usage of traits.