Skip to content

Commit

Permalink
reduce debug output in release/bench builds
Browse files Browse the repository at this point in the history
This reduces the binary size from 154 MiB to 70 MiB (#70 progress).
Tools like `cargo flamegraph` still work fine.

As suggested by "EarthFeet" on reddit:
https://www.reddit.com/r/rust/comments/rw0jad/cargos_strip_profile_option_has_been_stabilized/hra193k/
  • Loading branch information
scottlamb committed Jan 5, 2022
1 parent 9b241c8 commit 0406e09
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Each release is tagged in Git and on the Docker repository
* fix [#184](https://github.com/scottlamb/moonfire-nvr/issues/184):
Moonfire NVR would stop recording on a camera that hit the live555 stale
file descriptor bug, rather than waiting for the stale session to expire.
* progress on [#70](https://github.com/scottlamb/moonfire-nvr/issues/184):
shrink the binary from 154 MiB to 70 MiB by reducing debugging information.

## `v0.7.1` (2021-10-27)

Expand Down
4 changes: 2 additions & 2 deletions server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ tempfile = "3.2.0"
opt-level = 2

[profile.release]
debug = true
debug = 1

[profile.bench]
debug = true
debug = 1

0 comments on commit 0406e09

Please sign in to comment.