Skip to content

Use IntersectionObserver to turn off renderer when hidden#1144

Merged
Tyriar merged 4 commits into
xtermjs:masterfrom
Tyriar:880_renderer_pause
Jan 5, 2018
Merged

Use IntersectionObserver to turn off renderer when hidden#1144
Tyriar merged 4 commits into
xtermjs:masterfrom
Tyriar:880_renderer_pause

Conversation

@Tyriar

@Tyriar Tyriar commented Dec 11, 2017

Copy link
Copy Markdown
Member

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

Tyriar commented Dec 11, 2017

Copy link
Copy Markdown
Member Author

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 left a comment

Copy link
Copy Markdown
Contributor

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

Tyriar commented Dec 12, 2017

Copy link
Copy Markdown
Member Author

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

@parisk parisk left a comment

Copy link
Copy Markdown
Contributor

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

Tyriar commented Jan 5, 2018

Copy link
Copy Markdown
Member Author

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

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