Live data from Hacker News

Chrome will aggressively throttle background tabs

blog.strml.net

51–60 of 403 posts

Re: Chrome will aggressively throttle background tabs

#51
post #5

Can we aggressively throttle memory usage? Why does it require 300-500MB of ram PER TAB?

It probably doesn't. Measuring memory usage is hard on a modern OS. I'd guess there's a lot of shared memory between tabs

If it doesn't, then why does it grind to a halt eventually on both Mac and Windows? Firefox suffers from the same nonsense as well. In fact, Safari seems to be the ONLY thing I can keep open for more than a day without a process restart.

Re: Chrome will aggressively throttle background tabs

#52

What are we supposed to do about stuff this? Like I wrote a video game https://play.basketball-gm.com/ that lets you open multiple tabs for viewing multiple screens even while simulation is occurring in another tab. But Chrome recently stopped running the simulation if it's in a background tab. Putting my simulation code in a Shared Worker would be nice, except Safari and IE will never support it and it seems likely…

As a workaround, in the meantime, have you tried using several windows, not just tabs? Of course, none of them can be minimized, but they can be covered by other windows and should still run.

Re: Chrome will aggressively throttle background tabs

#54
post #24

Earlier quoted context omitted.

Measuring it is easy. Defining it is what's hard. If three processes each have the same 10MB executable mapped into memory, plus 10MB of heap data, how much memory is each process using? There's no easy answer to that question.

Defining it is what's hard. how much memory is each process using? 20MB. Oh but they are sharing the pages the executable is mapped into. So how can you can you say they are each using that much RAM? Because that 10MB of RAM won't be freed until the last process exits. Each process is using 20MB of physical pages. If only 1 was running it would use 20MB. The semantics that each process is sharing 5 HUGEPAGES of heap…

Sure, shared/unshared semantics are not hard. How do you map that to a generic concept of "usage"? There's no right way to do it.

It doesn't really make sense to ask "how much memory is this process using?" Instead, you want to ask questions like "how much memory are all of these processes using?" or "how much memory would be freed if I terminate these processes?" or "how much extra memory will be used if I start another process?"

What's hard is understanding which question you want to ask in any given situation.

Re: Chrome will aggressively throttle background tabs

#55

How about displaying more info about the "weight" of a page, when it comes to downloaded assets, cookies / local storage, RAM and CPU usage? I know there are ass backwards and fugly ways to see all of that, but why can't I see a list of all open tabs, with columns of such info which I get to define and sort as I please? Why not have the option to that info pop up when hovering over a tab, and to show notification ico…

You do know that Chrome has a task manager that will display memory, CPU and network usage for each tab right?

Re: Chrome will aggressively throttle background tabs

#56
post #26

This is going to destroy HLS playback in a background tab. Playing back HLS with JS is already a very cpu intensive, time-dependent process and we've already struggled with the current background tab throttling - a delay like this will all but kill playback or make it stutter to the point you'll wish it's dead instead. I commend Chrome for driving web standards but they've been a huge bully recently.

I don't believe it will. From https://groups.google.com/a/chromium.org/forum/#!topic/blink... :

Background tabs usually do not have a visible impact for user (tabs with audio are always considered foregrounded).

Re: Chrome will aggressively throttle background tabs

#57
post #33
post #3

Oh god, please change the title. It's about timers, not bandwidth. I was already imagining streaming music from Spotify and having hiccups all day.

They throttle timer activation frequency if you use too much CPU time (with the goal of throttling CPU usage). How is the title not accurate?

It is confusing. I thought it meant network throttle till I read the post.

Re: Chrome will aggressively throttle background tabs

#58
post #16

Can't we use serviceWorkers to workaround this? That's what they were created for. I have a webaudio side project that works nicely even on the background using serviceWorkers for timing. I'm hoping it will be the same on 56.

No. They aren't cross browser compatible or backwards compatible.

They work fine in latest Chrome and kinda work in Firefox. But Edge and mobile browsers? Not a chance.

Re: Chrome will aggressively throttle background tabs

#59

What are we supposed to do about stuff this? Like I wrote a video game https://play.basketball-gm.com/ that lets you open multiple tabs for viewing multiple screens even while simulation is occurring in another tab. But Chrome recently stopped running the simulation if it's in a background tab. Putting my simulation code in a Shared Worker would be nice, except Safari and IE will never support it and it seems likely…

Iframe them onto one page and make the browser window huge. Something like: There's also the and tags to divide pages between URLs.

[deleted]

Re: Chrome will aggressively throttle background tabs

#60
post #10

What are we supposed to do about stuff this? Like I wrote a video game https://play.basketball-gm.com/ that lets you open multiple tabs for viewing multiple screens even while simulation is occurring in another tab. But Chrome recently stopped running the simulation if it's in a background tab. Putting my simulation code in a Shared Worker would be nice, except Safari and IE will never support it and it seems likely…

What are you supposed to do? Implement it as a single page application.

It is. But then you open it in multiple tabs, because that's how people use websites.

Unless I'm supposed to re-implement tabs within my single page application and then force it to only let one tab run, which I guess is possible but horrible :)

Post reply on HN