[Webkit-unassigned] [Bug 162865] Background tabs should suspend or unload on macOS

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 4 23:45:46 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=162865

--- Comment #6 from Gavin Barraclough <barraclough at apple.com> ---
(In reply to comment #5)
> If I create another tab, and make it frontmost, the CPU usage drops down to
> well under 1% as expected. If I move the window to another space, I also see
> CPU usage go down. Awesome!

FYI minimizing the window to the dock should work too.

> However, if I create another window and make it frontmost in the same space,
> the CPU usage for the previously opened window/tab doesn't go down.

We will also apply throttling if the window is fully occluded. If you create another window and arrange it such that it completely hides the previous window then you should see CPU drop. This should work with a single large window, or if multiple smaller windows (of any app) are tiled to cover the first window. This means that if you have a stack of windows open there is a good chance that any Safari windows deeper into the stack will be getting full force throttling applied to all tabs, including frontmost.

For tabs where something is animating we assume this may be desired behaviour, and do not apply any throttling. E.g. you might have arranged your windows such that you can watch a video in a background-but-visible Safari window while actively working in another window that is frontmost. But for any tab where there are no user visible changes for ~45 seconds a softer version of the throttling mechanism should be kicking in. The Stripe page is not changing and ought to be benefiting from this – however this doesn't seem to be working – CPU usage does not appear to improve after 45s.

It looks like either the throttling of visually idle pages is not kicking in for this page, or is triggering as expected but the more restricted throttling is ineffective at curbing CPU in this case. Either way, this is something we should investigate. <rdar://problem/28627484>

Also, this page should not be using 10%+ CPU to do nothing. We should investigate. <rdar://problem/28627458>

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20161005/b1bbe413/attachment.html>


More information about the webkit-unassigned mailing list