Chrome should use minimal resources when not running as active user |
|||||
Issue descriptionI use fast user switching on my personal OS X machine. I've noticed that Chrome running as an inactive user sometimes chews up lots of CPU. It would be awesome if we could treat this case (running as a user that has been fast-user-switched into inactivity) as some sort of uber-background state -- pause V8 altogether, or at least throttle timers, and that sort of thing. Here is a scenario that I believe got my machine into a state where 100% of one CPU core was being eaten by a renderer in an inactive user session: - Open up a single tab and navigate to YouTube - Go fullscreen - Pause the video - Mouse to the upper-right corner of the screen to get to the system user picker and switch to another user account At this point, the video is still fullscreen in the foreground, but the whole login session is invisible since another user is piloting the machine. While I've observed this on a Mac, I expect the same thing is possible on Windows, so I'll mark this for both platforms. In Windows-land, WM_WTSSESSION_CHANGE is the message to watch out for. It looks like we do have some plumbing for it, but it's not obvious to me that we use it as a signal that all tabs are suddenly considered backgrounded. Is there a chance that the OS deactivates the active window before sending the session chance message? Also flagging this as Performance-Power since Chrome is responsible for excessive battery use in this scenario.
,
Feb 14 2017
,
Mar 1 2017
Given the impact of lowering the priority of renderers for background tabs, it seems that doing the same when a user session becomes inactive will be great for users -- it'll make their machines more responsive for whatever their task at hand is. Does anyone care to step-up and make this happen?
,
May 8 2017
This is still a thing (see attached). This time the offending tab was busy showing ads to an inactive user session.
,
May 9 2017
Ryan, I think this needs to be vetted by product unless this can be rolled up into work around background tab efficiencies. This seems like a different mechanism, so I'm not sure what we want to do here from a product standpoint or what the priority is.
,
May 10 2017
We already have code to lower the priority of background tabs. Is it possible to hit that codepath when the user session is swapped out? This feels like it should be low-hanging fruit.
,
Sep 20 2017
,
Sep 20
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Oct 1
It is possible that crbug.com/813093 will handle this case. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by pinkerton@chromium.org
, Feb 14 2017