bevy ui render `extract_*` systems are executed sequentially, not in parallel causing performance impact
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## Bevy version and features
0.18.0
## What you did
Built complex UI using bevy ui
## What went wrong
UI information extraction to render world takes a long time due to them all depending on
`extracted_uinodes: ResMut<'_, ExtractedUiNodes>`. Due to that they are executed sequentially.
2ms in example image:
## Additional information
Only push operations are done in vectors contained in ExtractedUiNodes during extraction.
We can extract into separate vectors and iterate over them all. So in theory I think that these systems are parallelizable.
Contributor guide
Research direction
Start by locating the Bevy UI render `extract_*` systems and the `ExtractedUiNodes` resource, then inspect how their shared `ResMut` dependency affects scheduling. Confirm the current sequential behavior with a profiling run like the reported complex UI example, and consider the proposed separate-vector extraction. Done means the extraction work can run in parallel without changing rendered UI behavior and the performance impact is measured.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics, game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100