Skip to content

Commit

Permalink
Mention how to disable trace logging (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
janhohenheim authored Jul 3, 2024
1 parent e83e149 commit d5e00fb
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Up to date as of Bevy 0.11.
- [Project Structuring](#project-structuring)
- [Prelude](#prelude)
- [Plugins](#plugins)
- [Performance](#performance)
- [Builds](#builds)
- [Development](#development)
- [Release](#release)
Expand Down Expand Up @@ -337,6 +338,16 @@ fn main() {
}
```

## Performance

Bevy's dependencies do a lot of trace logging that is not relevant for an end user.
To improve your runtime performance, you can add the following to the `[dependencies]` section of your Cargo.toml.
It will disable high log levels on compile time so that they do not need to be filtered out while your app is running.

```toml
log = { version = "0.4", features = ["max_level_debug", "release_max_level_warn"] }
```

## Builds

Bevy does not yet provide it's own build system, so we get the default Rust profiles of `dev` and `release`. While these profiles are a decent starting point, they're conservative and need to cater to a wide set of circumstances.
Expand Down Expand Up @@ -429,4 +440,4 @@ This dual-licensing approach is the de-facto standard in the Rust ecosystem and

### Your contributions

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

0 comments on commit d5e00fb

Please sign in to comment.