Skip to content

Commit

Permalink
Don't examine every entity when extracting SpriteSources. (#12957)
Browse files Browse the repository at this point in the history
`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.
  • Loading branch information
pcwalton committed Apr 13, 2024
1 parent 60e400b commit 363210f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/bevy_sprite/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ pub fn calculate_bounds_2d(
impl ExtractComponent for SpriteSource {
type QueryData = ();

type QueryFilter = ();
type QueryFilter = With<SpriteSource>;

type Out = SpriteSource;

Expand Down

0 comments on commit 363210f

Please sign in to comment.