-
Notifications
You must be signed in to change notification settings - Fork 472
build: Use unpacked split debuginfo and incremental build #23410
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
Conversation
Unfortunately, last I looked,
On Linux, setting It seems ... maybe? ... reasonable to set |
+1 on re-enabling incremental mode, though! If you want to split that out into its own PR I think we could merge immediately. |
If dwp/dwo files are not supported by Polar Signals that's unfortunate. Probably mostly for local usage then.
I'll verify. |
They're basically not supported as a distribution mechanism by anything. They're not usable with |
See https://doc.rust-lang.org/rustc/codegen-options/index.html#split-debuginfo This should lead to: - faster scratch build (4:12 -> 4:03) - smaller executable (2.7 GB -> 1.6 GB environmentd) - reduced disk usage (39 GB -> 32 GB target dir) - reduced memory usage during compilation (1.83 GB -> 0.08 GB max RSS in environmentd linking) See for example https://www.productive-cpp.com/improving-cpp-builds-with-split-dwarf/
The previous problem seems to have been cargo clippy, see https://materializeinc.slack.com/archives/CMH6PG4CW/p1694572440379559 Now that we enforce Rust 1.74 the issue seems to be fixed.
7ab2730
to
6dc7afe
Compare
diff --git a/src/environmentd/src/bin/environmentd/main.rs b/src/environmentd/src/bin/environmentd/main.rs
index c6e2a0dcbc..80cfe3751c 100644
--- a/src/environmentd/src/bin/environmentd/main.rs
+++ b/src/environmentd/src/bin/environmentd/main.rs
@@ -621,6 +621,7 @@ fn aws_secrets_controller_key_alias(env_id: &EnvironmentId) -> String {
}
fn main() {
+ panic!("foo");
let args = cli::parse_args(CliConfig {
env_prefix: Some("MZ_"),
enable_version_flag: true, bin/mzcompose --find testdrive --dev run default Seems to work:
|
Even if we can't use it in release builds, decreasing the incremental debug build time by 10x is hugely valuable. Thanks for finding this! |
See https://doc.rust-lang.org/rustc/codegen-options/index.html#split-debuginfo
This should lead to:
cargo build && echo "//" >> src/environmentd/src/bin/environmentd/main.rs && time cargo build
: 20 s -> 2.3 s)See for example https://www.productive-cpp.com/improving-cpp-builds-with-split-dwarf/ from a former colleague of mine, we had good experiences with split dwarf.
Does this matter for our release process or will the debuginfo still be uploaded correctly? Have to check with Brennan.
Also enable incremental build again, the previous problem seems to have been cargo clippy, see https://materializeinc.slack.com/archives/CMH6PG4CW/p1694572440379559 . Now that we enforce Rust 1.74 the issue seems to be fixed.
Checklist
$T ⇔ Proto$T
mapping (possibly in a backwards-incompatible way), then it is tagged with aT-proto
label.