Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Put asset_events behind a run condition (#11800)
# Objective Scheduling low cost systems has significant overhead due to task pool contention and the extra machinery to schedule and run them. Following the example of #7728, `asset_events` is good example of this kind of system, where there is no work to be done when there are no queued asset events. ## Solution Put a run condition on it that checks if there are any queued events. ## Performance Tested against `many_foxes`, we can see a slight improvement in the total time spent in `UpdateAssets`. Also noted much less volatility due to not being at the whim of the OS thread scheduler. ![image](https://github.com/bevyengine/bevy/assets/3137680/e0b282bf-27d0-4fe4-81b9-ecd72ab258e5) --------- Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
- Loading branch information