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

Use IntersectionObserver to turn off renderer when hidden #1144

Merged
merged 4 commits into from
Jan 5, 2018

Conversation

Tyriar
Copy link
Member

@Tyriar Tyriar commented Dec 11, 2017

Fixes #880


@mofux seems to work nicely in Chrome, what do you think? This can save like 5ms a frame for heavy operations 🔥

@Tyriar Tyriar self-assigned this Dec 11, 2017
@Tyriar Tyriar requested a review from mofux December 11, 2017 23:17
@Tyriar
Copy link
Member Author

Tyriar commented Dec 11, 2017

Here's an annotated timeline of the change within VS Code doing the following:

  1. Open a terminal
  2. Run ls -lR in large folder
  3. Create new terminal (hide busy terminal)

image

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.

Copy link
Contributor

@mofux mofux left a 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!

@Tyriar
Copy link
Member Author

Tyriar commented Dec 12, 2017

🎉 will wait until v3 is done before merging it in.

Copy link
Contributor

@parisk parisk left a 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.

@Tyriar Tyriar changed the base branch from v3 to master January 5, 2018 16:26
@Tyriar
Copy link
Member Author

Tyriar commented Jan 5, 2018

Linux tests are passing, merging this in (mac agents are backed up)

@Tyriar Tyriar merged commit eac14a1 into xtermjs:master Jan 5, 2018
@Tyriar Tyriar deleted the 880_renderer_pause branch January 5, 2018 22:16
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.

3 participants