Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extract_component commands are consuming a signficant amount of time in many_cubes #12956

Closed
james7132 opened this issue Apr 13, 2024 · 0 comments · Fixed by #12957
Closed

extract_component commands are consuming a signficant amount of time in many_cubes #12956

james7132 opened this issue Apr 13, 2024 · 0 comments · Fixed by #12957
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior C-Performance A change motivated by improving speed, memory usage or compile times C-Regression Functionality that used to work but no longer does. Add a test for this!
Milestone

Comments

@james7132
Copy link
Member

james7132 commented Apr 13, 2024

Bevy version

main (60e400b)

Relevant system information

cargo 1.79.0-nightly (a59aba136 2024-03-28)
Windows 11

What's performing poorly?

Running many_cubes in the default shows a huge 3+ms span for extract_components<SpriteSource>'s commands. This seems like it shouldn't affect a 3D rendering benchmark like many_cubes

Before and After Traces

Before: https://files.jliu.xyz/bevy/traces/12956/before.tracy
image

After: https://files.jliu.xyz/bevy/traces/12956/after.tracy
image

Trace:

Additional information

This was likely introduced in #12945.

@james7132 james7132 added C-Bug An unexpected or incorrect behavior C-Performance A change motivated by improving speed, memory usage or compile times S-Needs-Triage This issue needs to be labelled C-Regression Functionality that used to work but no longer does. Add a test for this! labels Apr 13, 2024
@james7132 james7132 changed the title extract_components extract_component commands are consuming a signficant amount of time in many_cubes Apr 13, 2024
@james7132 james7132 added A-Rendering Drawing game state to the screen and removed S-Needs-Triage This issue needs to be labelled labels Apr 13, 2024
@alice-i-cecile alice-i-cecile added this to the 0.14 milestone Apr 13, 2024
pcwalton added a commit to pcwalton/bevy that referenced this issue Apr 13, 2024
`ExtractComponentPlugin` doesn't check to make sure the component is
actually present unless it's in the `QueryFilter`. This meant we placed
it everywhere. This regressed performance on many examples, such as
`many_cubes`.

Fixes bevyengine#12956.
github-merge-queue bot pushed a commit that referenced this issue Apr 13, 2024
`ExtractComponentPlugin` doesn't check to make sure the component is
actually present unless it's in the `QueryFilter`. This meant we placed
it everywhere. This regressed performance on many examples, such as
`many_cubes`.

Fixes #12956.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior C-Performance A change motivated by improving speed, memory usage or compile times C-Regression Functionality that used to work but no longer does. Add a test for this!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants