Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upLow performance in debug mode #346
Comments
In my experience release mode is literally 10x faster than debug mode. |
Although adding a crate override to increase opts for bevy nearly doubles the clean build times on my old thinkpad, the incremental/iterative builds have so far been similar (in addition to making performance with dev builds more bearable). https://doc.rust-lang.org/cargo/reference/profiles.html#overrides # Cargo.toml
[profile.dev.package.bevy]
opt-level = 1 If this is recommended in the guide, I suggest that there is a warning about increases in clean build times and a decrease in debugging quality (if debugging struggles, one should lower the opt-level back). That said, I think giving the option light, especially for the many new rust users diving in because of bevy, would be a good addition. |
Isn't this just a general Rust thing? Debug rust is slow as a rule. If you want it to be fast, compile in release mode. |
If one only needs it to be as fast, the default |
Just a heads up, debug mode also turns on GPU validation for vulkan and possibly other platforms. +1 for adding something to the getting started guide |
Yup I also think this deserves to be called out in the getting started guide. |
I have recently discovered that bevy is quite laggy if debug is targeted even on a simple 3D scene. This is a issue that will greatly affect any larger projects quite soon and even the editor. There were some suggestions about enabling optimization even for debug, I think this should be included in start-up guide.