bevy/crates/bevy_ecs/src/schedule
Christian Hughes f87b9fe20c
Turn apply_deferred into a ZST System (#16642)
# Objective

- Required by #16622 due to differing implementations of `System` by
`FunctionSystem` and `ExclusiveFunctionSystem`.
- Optimize the memory usage of instances of `apply_deferred` in system
schedules.

## Solution

By changing `apply_deferred` from being an ordinary system that ends up
as an `ExclusiveFunctionSystem`, and instead into a ZST struct that
implements `System` manually, we save ~320 bytes per instance of
`apply_deferred` in any schedule.

## Testing

- All current tests pass.

---

## Migration Guide

- If you were previously calling the special `apply_deferred` system via
`apply_deferred(world)`, don't.
2024-12-05 18:14:05 +00:00
..
executor Turn apply_deferred into a ZST System (#16642) 2024-12-05 18:14:05 +00:00
graph Turn apply_deferred into a ZST System (#16642) 2024-12-05 18:14:05 +00:00
condition.rs Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
config.rs Turn apply_deferred into a ZST System (#16642) 2024-12-05 18:14:05 +00:00
mod.rs Remove petgraph from bevy_ecs (#15519) 2024-12-03 20:01:55 +00:00
schedule.rs Turn apply_deferred into a ZST System (#16642) 2024-12-05 18:14:05 +00:00
set.rs Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
stepping.rs Remove thiserror from bevy_ecs (#15774) 2024-10-09 14:20:58 +00:00