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鈥檒l 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 Dec 11, 2017
@Tyriar
Copy link
Member Author

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

@mofux
mofux approved these changes Dec 12, 2017
Copy link
Contributor

@mofux mofux left a comment

Very nice and well written PR, I'm more happy to get this merged!

@Tyriar
Copy link
Member Author

@Tyriar Tyriar commented Dec 12, 2017

馃帀 will wait until v3 is done before merging it in.

@parisk
parisk approved these changes Dec 16, 2017
Copy link
Contributor

@parisk parisk left a comment

LGTM 馃憤. Can't wait to see this in 3.1.

@Tyriar Tyriar changed the base branch from v3 to master Jan 5, 2018
Tyriar added 3 commits Jan 5, 2018
@Tyriar
Copy link
Member Author

@Tyriar 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
1 check was pending
1 check was pending
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@Tyriar Tyriar deleted the Tyriar:880_renderer_pause branch Jan 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants