perf: Reduce component structure check overhead #516
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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.