New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 691713 link

Starred by 4 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Chrome should use minimal resources when not running as active user

Project Member Reported by grt@chromium.org, Feb 13 2017

Issue description

I 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.
 
Cc: erikc...@chromium.org shrike@chromium.org

Comment 2 by shrike@chromium.org, Feb 14 2017

Cc: brucedaw...@chromium.org

Comment 3 by grt@chromium.org, 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?

Comment 4 by grt@chromium.org, May 8 2017

This is still a thing (see attached). This time the offending tab was busy showing ads to an inactive user session.
Screen Shot 2017-05-06 at 11.28.16 PM.png
28.4 KB View Download
Owner: rsch...@chromium.org
Status: Assigned (was: Untriaged)
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.

Comment 6 by grt@chromium.org, 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.
Owner: ----
Status: Available (was: Assigned)
Project Member

Comment 8 by sheriffbot@chromium.org, Sep 20

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
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
It is possible that crbug.com/813093 will handle this case.

Sign in to add a comment