bevy/crates/bevy_ecs/src/schedule/executor
Mike d95df29fc0 early return from multithreaded executor (#7521)
# Objective

- There is a small perf cost for starting the multithreaded executor.

## Solution

- We can skip that cost when there are zero systems in the schedule. Overall not a big perf boost unless there are a lot of empty schedules that are trying to run, but it is something.

Below is a tracy trace of the run_fixed_update_schedule for many_foxes which has zero systems in it. Yellow is main and red is this pr. The time difference between the peaks of the humps is around 15us.

![image](https://user-images.githubusercontent.com/2180432/216884536-f3af8f5e-6224-4d0f-8fbd-67b0beb90baf.png)
2023-02-06 20:50:08 +00:00
..
mod.rs Rename schedule v3 to schedule (#7519) 2023-02-06 18:44:40 +00:00
multi_threaded.rs early return from multithreaded executor (#7521) 2023-02-06 20:50:08 +00:00
simple.rs Rename schedule v3 to schedule (#7519) 2023-02-06 18:44:40 +00:00
single_threaded.rs Rename schedule v3 to schedule (#7519) 2023-02-06 18:44:40 +00:00