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…
It would be dodgy hack, but another HN comment made reference to a statement that tabs playing audio are always considered "foregrounded": https://groups.google.com/a/chromium.org/forum/#!topic/blink...
Chrome will aggressively throttle background tabs
131–140 of 403 posts
Re: Chrome will aggressively throttle background tabs
#132I like the change as a general idea but there obviously needs to be a manual override. Like, I don't want websites to access my camera without permission but obviously I want to allow some websites to do that. A similar permission could be used here and is perfectly backwards compatible: 1. a tab exceeds its quota and throttling kicks in; 2. you visit the tab to check why it stopped working; 3. you get a permission p…
>3. I swear to god if I see anything mentioning a battery on a desktop machine with no battery...
All I know is that my desktop runs at about 70W idle vs. 450W fully-loaded. Unnecessary use of the CPU wastes money regardless of whether or not you're using that money to charge a battery.
Re: Chrome will aggressively throttle background tabs
#133It's awesome to see Chrome trying to improve performance for people with many tabs open, which is many of us. I use a LOT of tabs, and the best plugin has been The Great Suspender. Highly recommend it for anyone who wants memory & CPU back and keeps many tabs/windows open at once: https://chrome.google.com/webstore/detail/the-great-suspende...
I meet many tab hoarders (always open a new one, never close any, ending up with hundrets), but just can't wrap my head around it! I hate having more than 6-7 simultaneously open because it gets increasingly harder to keep an overview of what you're doing. The same applies for IDE tabs or windows. Too much of them and finding the right one becomes increasingly hard, and losing the thread more likely.
Re: Chrome will aggressively throttle background tabs
#134If your backgrounded browser app needs 100% of the CPU, you've made a mistake.
Re: Chrome will aggressively throttle background tabs
#135Re: Chrome will aggressively throttle background tabs
#136Earlier quoted context omitted.
Pinned tabs would be an easy solution for this. "Don't throttle pinned tabs"
A common use-case is tabs that are streaming music. I'm not sure if most users are even aware of pinned tabs.
Re: Chrome will aggressively throttle background tabs
#137Earlier quoted context omitted.
Oh, it's awful, I agree. This is the nicest layout but the JS is terrible. I've reverted to a plain-HTML layout.
To whoever downvoted this: I am the author of the post above, and in response I've removed the JS-centric layout.
Re: Chrome will aggressively throttle background tabs
#138Earlier quoted context omitted.
It is a pure SPA, you just have the option of opening multiple instances at the same time. Like I can open gmail in two tabs, but it's still an SPA. And yeah tabs in JS are possible and I might go down that route, it'll just be a lot of extra work to replicate a UI that already exists fine.
Here's an example: http://orteil.dashnet.org/cookieclicker/ Opening another tab creates a new bakery, not a view into the same bakery. (This only works if you haven't played before or clear your cookies.) Edit: If you really want to keep the same functionality then you would need to bring server communication into the mix. It's possible to either run the simulation server-side, or at least communicate the state betwe…
Re: Chrome will aggressively throttle background tabs
#139What 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 developer you need to decide whether or not to support a browser, and if that browser doesn't provide the APIs you need then you should drop support for that feature in that browser. In this case, if Chrome is making a change that you can't or won't change your game for then the solution is to detect Chrome and display a "This game only works in a single tab in Chrome. Try Firefox!" message if a user opens it in…
Re: Chrome will aggressively throttle background tabs
#140Earlier quoted context omitted.
Yes? I mean, you have to admit what you built is the epitome of edge case when it comes to how a browser is typically used, and is actually exactly the type of thing they want to optimize because basically if you aren't looking at the tab, it's not being used (generally). Maybe use electron or something?
I don't think that replacing a traditional desktop app with a web app is an edge case. That's one of the main points of HTML5.
> It is a pure SPA, you just have the option of opening multiple instances at the same time. Like I can open gmail in two tabs, but it's still an SPA.
Gmail just runs the UI in the browser though, the actual work of processing, receiving and sending mail is not done in a tab. The tabs are just views into the system.
It sounds like you are having one tab as both the client and the server, and separate tabs as clients to that other tab, which is pretty edge case.
As someone else suggested, you could move the processing to the server, but I imagine that's not feasible because then you are centralizing the processing and you're paying for processing, not the people visiting.
The more appropriate way to architect this (to my eyes, so take it for whatever you think it's worth) would be to use JS to manage tabs within the application (which you mentioned elsewhere already). The really simple way to implement this might be to have the JS tabs just contain an iframe to the prior implementation's real separate tab URL (since it already works that way, there's not likely to be any security issues you have to deal with).