Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduced-scope version of detaching unused pool elements from scene graph #5188

Merged

Conversation

diarmidmackenzie
Copy link
Contributor

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...

@diarmidmackenzie
Copy link
Contributor Author

#5189 offered as an alternative, about which I have fewer perf concerns, in case it is preferred. We should close whichever of #5188 or #5189 is not taken.

@dmarcos
Copy link
Member

dmarcos commented Dec 24, 2022

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!

@dmarcos dmarcos merged commit e5bf9e0 into aframevr:master Dec 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants