-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize observer unregistration (#15150)
# Objective Fixes #14980 ## Solution Only iterate over archetypes containing the component. ## Alternatives Additionally, for each archetype, cache how many observers are watching one of its components & use this to speed up the check for each affected archetype ([implemented here](55c89aa)). Benchmarking showed this to lead only to a minor speedup. ## Testing There's both already a test checking that observers don't run after being despawned as well as a regression test for the bug that necessitates the check this PR optimizes.
- Loading branch information
1 parent
c454db8
commit f570f52
Showing
2 changed files
with
12 additions
and
9 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