-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Stream the dep-graph to a file instead of storing it in-memory. #82780
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 987aaf8c8ecff5fc3f2d6d4cbc04de6d6803886a with merge 1dcaa7f88c16bc44af2b3dc563a4dd2d5b391823... |
This comment has been minimized.
This comment has been minimized.
☀️ Try build successful - checks-actions |
Queued 1dcaa7f88c16bc44af2b3dc563a4dd2d5b391823 with parent 4099208, future comparison URL. |
Finished benchmarking try commit (1dcaa7f88c16bc44af2b3dc563a4dd2d5b391823): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
Perf: large reduction in max-rss for incr-comp, but really slow. |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 9a2749d6b7dd0d34a20be6a168b77e6cc7dc841f with merge 1ca30158cd250a1d4cd67eea2a8784709fcea9a6... |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 9a2749d6b7dd0d34a20be6a168b77e6cc7dc841f with merge 18ab57771eb73a559bbd9496c7ac99ad573ef776... |
Looks like something went wrong when updating the error checking code. |
It may also be useful in these cases, and some CI configurations test without debug assertions.
OK, I assume that won't really hurt performance. @bors r+ |
📌 Commit f3dde45 has been approved by |
⌛ Testing commit f3dde45 with merge 87ae22ab35bdf856af25cbc0c93da922a7c0708c... |
💔 Test failed - checks-actions |
Seems spurious. |
☀️ Test successful - checks-actions |
https://perf.rust-lang.org/compare.html?start=803ddb83598838fb9de308d283b759ba463e5e80&end=d474075a8f28ae9a410e95d849d009006db4b176&stat=instructions:u performance results for the final collection. |
I'm curious where the syn-opt regression comes from. Everything else looks good to me. |
True, but that's to be expected since we take a measurement per dep-node now instead of measuring a single bulk-serialization at the end. Other benchmarks show the same change but don't seem to regress. |
Sorry, I've deleted my comment when I realized that. |
No worries |
This is a reimplementation of #60035.
Instead of storing the dep-graph in-memory, the nodes are encoded as they come
into the a temporary file as they come. At the end of a successful the compilation,
this file is renamed to be the persistent dep-graph, to be decoded during the next
compilation session.
This two-files scheme avoids overwriting the dep-graph on unsuccessful or crashing compilations.
The structure of the file is modified to be the sequence of
(DepNode, Fingerprint, EdgesVec)
.The deserialization is responsible for going to the more compressed representation.
The
node_count
andedge_count
are stored in the last 16 bytes of the file,in order to accurately reserve capacity for the vectors.
At the end of the compilation, the encoder is flushed and dropped.
The graph is not usable after this point: any creation of a node will ICE.
I had to retrofit the debugging options, which is not really pretty.