News for hackers. Stuff that matters.
Re:Chrome will aggressively throttle background tabs by skilgarriff on Tuesday January 24, 2017 @02:11PM (#13474474)
If you happen to use React, I built a React component that helps you manage this! :) Hopefully it helps a bit! It also reports whether or not a user is idle, such that you can reduce cpu usage during that as well.

https://github.com/Skilgarriff/react-user-focus

Re:Chrome will aggressively throttle background tabs by LeanderK on Tuesday January 24, 2017 @03:11PM (#13475010)
i don't know anything about React, but why can't react itself try to manage this?
Re:Chrome will aggressively throttle background tabs by STRML on Tuesday January 24, 2017 @03:18PM (#13475061)
React is in the business of limiting its API surface, not increasing it. I think they have done a great job of it - libraries like this should exist in userland.
Re:Chrome will aggressively throttle background tabs by cpeterso on Tuesday January 24, 2017 @04:30PM (#13475703)
It seems like React could listen for visibilitychange itself to throttle its own events or virtual DOM processing. It wouldn't necessarily need to expose visibilitychange as a library API.
Re:Chrome will aggressively throttle background tabs by KirinDave on Tuesday January 24, 2017 @07:09PM (#13477110)
Because there is no sufficient magic for that. App developers have to think about when they do work, how much work they do, and if and when it should be rendered. For any rule you can give, I can give you an example of an app that would break.

In general, the mantra for people who find this tough to fix should be, "Why didn't I use MVC, what a cretin I was!"