next.js
75c51c65 - Turbopack: Use `debug = "line-tables-only"` for dev builds (#91539)

Commit
34 days ago
Turbopack: Use `debug = "line-tables-only"` for dev builds (#91539) This defaults to `true`: https://doc.rust-lang.org/cargo/reference/profiles.html#debug Nobody on the team uses a debugger often enough for this to be worth the time tradeoff: https://kobzol.github.io/rust/rustc/2025/05/20/disable-debuginfo-to-improve-rust-compile-times.html I'm gathering some rough numbers, and I'll add them to the PR. After `cargo clean` and one `cargo build -p next-napi-bindings` with each profile (Linux arm64): ``` du -sh target/* 4.0K target/CACHEDIR.TAG 7.9G target/debug 14G target/dev-with-debug 7.5M target/generated ``` This is nearly half the size. Due to cargo quirks, the `dev` profile defaults to the `target/debug` directory. Of course, any disk size wins you get are more than offset if you need to use a debugger and end up with an additional profile. ``` hyperfine -w 1 -r 5 -p 'cargo clean' 'cargo build --profile dev-with-debug -p next-napi-bindings' 'cargo build -p next-napi-bindings' ``` ...pending... (this is on https://github.com/bgw/benchmark-scripts/, on my M2 Macbook inside of a Linux VM this takes closer to 2m20s)
Author
bgw bgw
Parents
Loading