Skip to content

Commit 363210f

Browse files
authored
Don't examine every entity when extracting SpriteSources. (#12957)
`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.
1 parent 60e400b commit 363210f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/bevy_sprite/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ pub fn calculate_bounds_2d(
214214
impl ExtractComponent for SpriteSource {
215215
type QueryData = ();
216216

217-
type QueryFilter = ();
217+
type QueryFilter = With<SpriteSource>;
218218

219219
type Out = SpriteSource;
220220

0 commit comments

Comments
 (0)