bevy/crates/bevy_ecs/src
Christian Hughes a0c722ff4c
Reduce memory usage in component fetches and change detection filters (#15283)
## Objective

- Adopted #6396

## Solution

Same as #6396, we use a compile-time checked `StorageSwitch` union type
to select the fetch data based on the component's storage type, saving
>= 8 bytes per component fetch in a given query.

Note: We forego the Query iteration change as it exists in a slightly
different form now on main.

## Testing

- All current tests pass locally.

---------

Co-authored-by: james7132 <contact@jamessliu.com>
Co-authored-by: Chris Russell <8494645+chescock@users.noreply.github.com>
2024-09-27 14:06:40 +00:00
..
entity Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
event Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
identifier Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
observer Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
query Reduce memory usage in component fetches and change detection filters (#15283) 2024-09-27 14:06:40 +00:00
reflect Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
schedule Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
storage Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
system Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
world Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
archetype.rs Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
batching.rs Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
bundle.rs Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
change_detection.rs Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
component.rs Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
intern.rs Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
label.rs Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
lib.rs Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
removal_detection.rs Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
traversal.rs Bubbling observers traversal should use query data (#15385) 2024-09-23 18:08:36 +00:00