forked from bevyengine/bevy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only run event systems if they have tangible work to do (bevyengine#7728
) # Objective Scheduling low cost systems has significant overhead due to task pool contention and the extra machinery to schedule and run them. Event update systems are the prime example of a low cost system, requiring a guaranteed O(1) operation, and there are a *lot* of them. ## Solution Add a run condition to every event system so they only run when there is an event in either of it's two internal Vecs. --- ## Changelog Changed: Event update systems will not run if there are no events to process. ## Migration Guide `Events<T>::update_system` has been split off from the the type and can be found at `bevy_ecs::event::event_update_system`. --------- Co-authored-by: IceSentry <IceSentry@users.noreply.github.com>
- Loading branch information
1 parent
0339338
commit 9e1cc5c
Showing
4 changed files
with
22 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters