bevy/crates/bevy_ecs/src
Giacomo Stevanato e320fa0738
Fix query transmute from table to archetype iteration unsoundness (#14615)
# Objective

- Fixes #14348 
- Fixes #14528
- Less complex (but also likely less performant) alternative to #14611

## Solution

- Add a `is_dense` field flag to `QueryIter` indicating whether it is
dense or not, that is whether it can perform dense iteration or not;
- Check this flag any time iteration over a query is performed.

---

It would be nice if someone could try benching this change to see if it
actually matters.

~Note that this not 100% ready for mergin, since there are a bunch of
safety comments on the use of the various `IS_DENSE` for checks that
still need to be updated.~ This is ready modulo benchmarks

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2024-08-27 00:58:40 +00:00
..
entity Apply unused_qualifications lint (#14828) 2024-08-21 12:29:33 +00:00
event Minimal Bubbling Observers (#13991) 2024-07-15 13:39:41 +00:00
identifier feat: Reflection implementations on Identifier (#13648) 2024-06-03 16:33:14 +00:00
observer Implement std::fmt::Debug for ecs::observer::Trigger (#14857) 2024-08-25 16:55:54 +00:00
query Fix query transmute from table to archetype iteration unsoundness (#14615) 2024-08-27 00:58:40 +00:00
reflect Use map_unchanged in reflection instead of creating a Mut manually. (#14692) 2024-08-15 14:26:57 +00:00
schedule Add condition_changed and condition_became_true to common_conditions (#14917) 2024-08-26 18:32:44 +00:00
storage Apply unused_qualifications lint (#14828) 2024-08-21 12:29:33 +00:00
system SystemParamBuilder - Support buildable Vec parameters (#14821) 2024-08-27 00:16:29 +00:00
world Implement std::fmt::Debug for ecs::observer::Trigger (#14857) 2024-08-25 16:55:54 +00:00
archetype.rs feat: add insert_if_new (#14397) (#14646) 2024-08-15 20:31:41 +00:00
batching.rs Parallel event reader (#12554) 2024-04-22 16:37:42 +00:00
bundle.rs Apply unused_qualifications lint (#14828) 2024-08-21 12:29:33 +00:00
change_detection.rs Add filter_map_unchanged to Mut<T> (#14837) 2024-08-22 17:51:21 +00:00
component.rs Component Lifecycle Hook & Observer Trigger for replaced values (#14212) 2024-07-15 15:24:15 +00:00
intern.rs Moves intern and label modules into bevy_ecs (#12772) 2024-04-08 15:34:11 +00:00
label.rs Add mappings to EntityMapper (#13727) 2024-06-08 12:52:23 +00:00
lib.rs Add Command and co. to prelude (#14751) 2024-08-15 13:33:32 +00:00
removal_detection.rs Created an EventMutator for when you want to mutate an event before reading (#13818) 2024-07-08 14:53:06 +00:00
traversal.rs Minimal Bubbling Observers (#13991) 2024-07-15 13:39:41 +00:00