Live data from Hacker News

Chrome will aggressively throttle background tabs

blog.strml.net

391–400 of 403 posts

Re: Chrome will aggressively throttle background tabs

#391

Earlier quoted context omitted.

Bugs which only affect a small minority of users don't exist, nor do unusual but perfectly legitimate usage patterns?

You probably want to re-read my post, as I said neither of these things.

You're right. I was confused because in your other comment you just said they were doing something wrong, and I didn't realize you'd reversed course on that.

Re: Chrome will aggressively throttle background tabs

#392
post #226

Earlier quoted context omitted.

Yeah - that's a really great trick! You can also get this somewhat "for free" by batching updates on `requestAnimationFrame`, which never fires when unfocused. https://www.npmjs.com/package/visibility is a nice little package that encapsulates some of the browser compat issues, if you have out-of-date clients.

But if you do this, isn't it possible that you'll queue up tons of re-renders that all go off when the tab comes back in focus? I'm thinking of React for example, where you might re-render a component with updated props several times per second. In my case, I've settled on just not re-rendering at all, and then doing so once with the latest props when "visibility" fires again with document.hidden === true.

Yes, this happens in my browser games. When the user clicks back to the tab it fires off all the frames that have been queued up, moving everything in hyperspeed until it's up to date. I don't really mind though, since it's multiplayer it's supposed to catch up but doesn't need to render when unfocused.

Re: Chrome will aggressively throttle background tabs

#393

Hi, this is Alexander. I'm an engineer on Chromium team working on scheduling and on background tab throttling in particular. Firstly, I want to make clear that we are not shipping this in Chrome 56. We have enabled throttling as an experiment in beta channel to measure impact and collect feedback from web devs. We will aim to ship it in Chrome 57, subject to further feedback. In response to concerns voiced we will d…

> We will also consider more signals to use in exempting a page from this throttling The main problems I have with background tabs and resource use is advertising iframes on otherwise inert pages. iflscience.com and sometimes imgur.com are two notable offenders here in my experience. Advertisers will opt of anything that might throttle their content whether they need to or not, without testing if they need to, just i…

Tabs playing audio will include a lot of people listening to music on youtube.

Re: Chrome will aggressively throttle background tabs

#394

Earlier quoted context omitted.

FYI: You can still close the tab, just not by clicking the (no longer visible) X. This may not fit your use case, but then again it might (I can't remember the last time I closed a tab by clicking instead of with ctrl+w).

he is saying that he wishing pinning tabs _prevented_ the tab from being closed (as opera does). I have closed pinned tabs my mistake before (ctrl+w too many times) and I agree.

Oh, my mistake

Re: Chrome will aggressively throttle background tabs

#397

Earlier quoted context omitted.

Pinned tabs would be an easy solution for this. "Don't throttle pinned tabs"

While this is elegant, its still dangerous. There are online payments that could check whether your booking is complete in the background by periodically firing ajax calls, bulk updates or uploads, etc.

If those sites are using more than 10% of a CPU to do it, then they've made a catastrophic error, and I'd be glad for Chrome to protect my battery from that.

Re: Chrome will aggressively throttle background tabs

#399
post #393

Earlier quoted context omitted.

> We will also consider more signals to use in exempting a page from this throttling The main problems I have with background tabs and resource use is advertising iframes on otherwise inert pages. iflscience.com and sometimes imgur.com are two notable offenders here in my experience. Advertisers will opt of anything that might throttle their content whether they need to or not, without testing if they need to, just i…

Tabs playing audio will include a lot of people listening to music on youtube.

Exactly. There are a few obvious things that want to be allowed and many others (sites playing adverts and such) that don't.

White-listing youtube would be one click for ever (potentially) and the same for other similar sites (vimeo, maybe facebook, ...) - in fact not even that as common sites like that could be on the list by default (as long as there is an easy way to de-list them).

Re: Chrome will aggressively throttle background tabs

#400
post #294

Earlier quoted context omitted.

I'd like to see the user better informed of hot (active) tabs. Just like there's an audio icon to help the user track down which tab is making noise, there should also be some mechanism to let the user know that a tab is more active than usual. I'd recommend a different background color for the tab, except that I'd also like to see (sign in) profiles have distinct background colors to aid the user in keeping their pr…

Color change on the tab would be nice - maybe have it slowly grow more red (and perhaps add an option to change the color as well - for colorblind folks) - then start blinking - then burst into flame...

I think Samsung tried that approach
Post reply on HN