Bevy 0.14 adds some very expensive debug assertions somewhere
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## Bevy version
0.14.0
## What you did
In bevy 0.13, my application runs at 60 FPS in a debug build with a Cargo profile override like this:
```toml
[profile.dev.package."*"]
opt-level = 3
```
In bevy 0.14, the same application struggles to hit 20 FPS with the same build configuration. Adding `debug-assertions = false` to the build config brings the lost performance back.
## What went wrong
While debug assertions are often useful, these seem a *bit* too heavy to justify their inclusion (especially given that even all the checked arithmetic in the whole dependency tree doesn't destroy performance this badly).
This may be caused by wgpu, I have not investigated this issue.
Contributor guide
Research direction
Start by reproducing the debug-build performance difference between Bevy 0.13 and 0.14 using the reported Cargo profile, then compare behavior with debug assertions disabled. Investigate whether the regression comes from Bevy or wgpu and identify the expensive assertion path; done means restoring comparable performance without broadly disabling debug assertions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- game-dev, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100