Current UiStack based extraction potentially leads to poor batching #7345
Labels
A-Rendering
Drawing game state to the screen
A-UI
Graphical user interfaces, styles, layouts, and widgets
C-Performance
A change motivated by improving speed, memory usage or compile times
S-Needs-Design
This issue requires design work to think about how it would best be accomplished
Bevy version
a3baf2a
What you did
cargo run --profile stress-test --features trace_tracy --example many_buttons
What went wrong
Issuing 24,000+ draw calls when it could be issuing 3.
The construction of
UiStack
forces siblings of a similar depth in the hierarchy to be non-adjacent if any of them have children. This also forces their descendants to not be adjacent, which is breaking large scale batching.bevy/crates/bevy_ui/src/stack.rs
Lines 93 to 102 in a3baf2a
The text was updated successfully, but these errors were encountered: