Skip to content

Commit

Permalink
split batches when iterating on a non dense query
Browse files Browse the repository at this point in the history
  • Loading branch information
mockersf committed Apr 16, 2021
1 parent 20673db commit 345c956
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/bevy_ecs/src/query/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,8 @@ where
let archetype = &world.archetypes[*archetype_id];
fetch.set_archetype(&self.fetch_state, archetype, tables);
filter.set_archetype(&self.filter_state, archetype, tables);

for archetype_index in 0..archetype.len() {
let len = batch_size.min(archetype.len() - offset);
for archetype_index in offset..offset + len {
if !filter.archetype_filter_fetch(archetype_index) {
continue;
}
Expand Down

0 comments on commit 345c956

Please sign in to comment.