Uh oh!
There was an error while loading. Please reload this page.
Serialize dependency graph directly from DepGraph - #80957
Conversation
rust-highfive
commented
Jan 12, 2021
r? @lcnr (rust-highfive has picked a reviewer for you, use r? to override) |
@rustbot label T-compiler A-incr-comp I-compiletime I-compilemem @bors try @rust-timer queue |
rust-timer
commented
Jan 12, 2021
Awaiting bors try build completion. |
tgnottingham
commented
Jan 12, 2021
Hm, I think the try request was dropped, maybe because the regular CI checks hadn't passed yet. @bors try @rust-timer queue |
rust-timer
commented
Jan 12, 2021
Awaiting bors try build completion. |
bors
commented
Jan 12, 2021
⌛ Trying commit 3ae463ae9db28561c67bbbad2735c751508ef9e0 with merge 140e2d824700dd32cc8a5a4fee0ca320c3d12360... |
bors
commented
Jan 13, 2021
☀️ Try build successful - checks-actions |
rust-timer
commented
Jan 13, 2021
Queued 140e2d824700dd32cc8a5a4fee0ca320c3d12360 with parent 7a9b552, future comparison URL. @rustbot label: +S-waiting-on-perf |
rust-timer
commented
Jan 13, 2021
Finished benchmarking try commit (140e2d824700dd32cc8a5a4fee0ca320c3d12360): 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 |
Reduce memory usage by serializing dep graph directly from `DepGraph`, rather than copying it into `SerializedDepGraph` and serializing that.
3ae463a to
09067dbComparelcnr
commented
Jan 13, 2021
r? @michaelwoerister maybe |
michaelwoerister
commented
Jan 15, 2021
Thanks for the PR, @tgnottingham! This looks good to me in general. I'll review properly next week. |
michaelwoerister
commented
Jan 19, 2021
Thanks for the PR, @tgnottingham! This looks like a step in the right direction. One thing I noticed while reading the code was that quite a bit of this data could be mapped from disk into memory as is (at least on little endian platforms) and already provides random access (DepNodes and Fingerprints don't use leb128 because that would actually waste space). So in the future, we might want to just define a proper binary file format for the dep-graph and make decoding lazy -- or partially lazy, depending on whether we can afford the additional disk space for encoding edge indices with 4 bytes instead of using leb128. Anyway, getting rid of the memory spike is the right thing to do in any case. @bors r+ |
bors
commented
Jan 19, 2021
📌 Commit 09067db has been approved by |
Thanks @michaelwoerister!
As a reference point, the style-servo-opt incr-full benchmark creates almost 16 million edges. The LEB128 encoding of the Edit: realized the above is a bad comparison, as the edges have values from 0 to number of nodes, not number of edges. But, if you assume the ~16 million edges have values equally distributed between 0 and 2.75 million (number of nodes in same benchmark), then the LEB128 encoding is ~48MB. So the savings are a bit more significant. This isn't representative of the actual edge data space requirements, but it suggests that raw-encoding might not be so bad. |
bors
commented
Jan 19, 2021
bors
commented
Jan 19, 2021
☀️ Test successful - checks-actions |
michaelwoerister
commented
Jan 22, 2021
It would be awesome if we added |
Reduce memory usage by serializing dep graph directly from
DepGraph,rather than copying it into
SerializedDepGraphand serializing that.