Reduced-scope version of detaching unused pool elements from scene graph#5188
Merged
dmarcos merged 1 commit intoaframevr:masterfrom Dec 24, 2022
Merged
Conversation
As per feedback in PR aframevr#5186
This was referenced Dec 24, 2022
Contributor
Author
Member
|
Thanks so much for the hard work. The time you put researching and profiling is super super appreciated. It can be really tedious, on headset in particular. I know this PR is not ideal. Just trying to contain the added code complexity. Enjoy the Holidays! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Updated set of changes as per feedback in PR #5186.
However I am concerned about the performance characteristics of updating raycasters in this way.
A querySelectorAll() call on an attribute selector
[raycaster]is potentially an expensive operation as it requires traversal of the entire HTML graph.However the alternative of caching the set of raycaster entities in the scene is also problematic, as you'd have to figure out when to refresh that cache...
Hence I think it would be better to stick with emitting events, as per #5186, to keep the performance overhead of adding to / removing from pools to a minimum.
@dmarcos - for now, leaving the code as per your request in #5186, pending your feedback. Happy to update this PR to include emitting the events if you agree that would be better from a performance pov. Let me know...