Add profiling build profile and symbol strip (#4630)

* Add profiling build profile and symbol strip

Stripping the symbols for the release build improves the size of the
binary significantly

Adds a custom build profile for performance profiling that includes all
symbols for analysis.

Can be used via

```
cargo build --profile profiling
```

* Retain a minimal backtrace
This commit is contained in:
Stefan Holderbach 2022-02-28 13:13:24 +01:00 committed by GitHub
parent 10364c4f22
commit eec1730449
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -97,6 +97,14 @@ dataframe = ["nu-command/dataframe"]
[profile.release]
opt-level = "s" # Optimize for size
strip = "debuginfo"
# build with `cargo build --profile profiling`
# to analyze performance with tooling like linux perf
[profile.profiling]
inherits = "release"
strip = false
debug = true
# Build plugins
[[bin]]