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

Consider not dirty check polling when the tab is not visible #892

Closed
ebidel opened this issue Nov 7, 2014 · 2 comments
Closed

Consider not dirty check polling when the tab is not visible #892

ebidel opened this issue Nov 7, 2014 · 2 comments
Assignees

Comments

@ebidel
Copy link
Contributor

ebidel commented Nov 7, 2014

We could use the page visibility api to stop dirty check polling when the tab is not active.
Browsers clamp setInterval to 1s when the tab is inactive, but we're still using the CPU.

https://github.com/Polymer/polymer-dev/blob/5a784f8828dd3f46d748a910bcf4c7be8516ab0e/src/system/flush.js#L61

@sorvell
Copy link
Contributor

sorvell commented Nov 7, 2014

@azakus Using page visibility seems reasonable to me. Mind taking a stab?

@dfreedm
Copy link
Member

dfreedm commented Nov 11, 2014

Implementation is pretty easy, but testing is hard. Need to force a new tab to open and take focus.
@nevir, we should investigate making wct be able to open tabs. I'll make a manual test for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants