-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Use IntersectionObserver to turn off renderer when hidden #1144
Conversation
Here's an annotated timeline of the change within VS Code doing the following:
To give an idea of the time saved, the draws on the busy terminal before the switch are about 5ms, 5ms and 2ms every available animation frame. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice and well written PR, I'm more happy to get this merged!
🎉 will wait until v3 is done before merging it in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍. Can't wait to see this in 3.1.
Linux tests are passing, merging this in (mac agents are backed up) |
Fixes #880
@mofux seems to work nicely in Chrome, what do you think? This can save like 5ms a frame for heavy operations 🔥