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

Zero out setTimeout id #7023

Closed
wants to merge 1 commit into from
Closed

Conversation

slimbuck
Copy link
Member

@slimbuck slimbuck commented Oct 10, 2024

I have noticed that cancelAnimationFrame actually appears on performance captures in Chrome, but cancelling should be almost always unnecessary.

In this PR I nullify the timeout id at the end of the update loop so cancelling is skipped during the next invocation.

I can't think of negative impact or side effect of this change, can you @Maksims ?

@Maksims
Copy link
Contributor

Maksims commented Oct 10, 2024

I believe the case of canceling was necessary for WebXR, either during session creation, and/or during WebXR active session to avoid rendering to non-xr canvas while session is running.
That needs to be tested.

@slimbuck
Copy link
Member Author

Actually the entire tick implementation needs a rewrite. Closing for now.

@slimbuck slimbuck closed this Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants