generated from vrchat-community/template-package
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: Reduce component structure check overhead (#516)
Previously, we issued change events whenever component order changed; this resulted in spurious invocations of listeners, which when did (potentially very expensive) redundant checks of what components were in their children. In particular, this was done whenever a _component_ changed; this was probably a bug, as a change event on the _GameObject_ is issued when component order changes. This change makes a few adjustments to fix this: * We record the child component list in the ShadowGameObject, and only generate change events if it actually changes. * We only perform component structure checks when _game objects_ change, not when the components themselves change. * We avoid registering complex filters for component structure events; those filters were expensive, frequently redundantly registered, and are no longer needed with the new ShadowGameObject component tracking. Closes: #513 perf: Remove redundant listener filters for MonitorGetComponents Now that the shadow hierarchy is checking for component structure changes, we don't need to perform these checks in SingleObjectQueries. Avoiding doing these checks there avoids redundant processing, which is particularly important since these will all generally converge into the same invalidation.
- Loading branch information
1 parent
372e6a0
commit 12e2805
Showing
8 changed files
with
116 additions
and
67 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
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