-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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_codegen_ssa: write .dwp
in a streaming fashion
#104797
Conversation
r? @jackh726 (rustbot has picked a reviewer for you, use r? to override) |
Let's @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit 433d471 with merge 0392eb80c2a945d3f05dd5382bc1b14c22214aff... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (0392eb80c2a945d3f05dd5382bc1b14c22214aff): comparison URL. Overall result: no relevant changes - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. |
@bors r+ rollup=maybe |
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#104716 (move 2 candidates into builtin candidate) - rust-lang#104760 (Clarify `SyntaxExtensionKind::LegacyDerive`.) - rust-lang#104797 (rustc_codegen_ssa: write `.dwp` in a streaming fashion) - rust-lang#104835 (Use infcx.partially_normalize_associated_types_in) - rust-lang#104853 (Fix typo in miri sysroot) - rust-lang#104879 (jsondoclint: Recognise Typedef as valid kind for Type::ResolvedPath) - rust-lang#104887 (rustbuild: Don't build doc::SharedAssets when building JSON docs.) - rust-lang#104896 (rustdoc: fix broken tooltip CSS) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
When writing a
.dwp
file, rustc writes to a Vec first then to a BufWriter-wrapped file. It seems very likely that we can write in a streaming fashion to avoid double buffering in an intermediate Vec.On my Linux machine,
.dwp
from the latest rust-lang/cargo is 113MiB. It may worth a stream writer, though I didn't do any benchmark 🙇🏾♂️.