Chrome spends CPU time on inaudible audio |
||||||
Issue descriptionChrome Version: 59.0.3049.0 OS: macOS What steps will reproduce the problem? (1) Go to https://arstechnica.com/ (or http://www.theverge.com/) (2) Create a new tab What is the expected result? The browser process should use little CPU. What happens instead? The browser process consumes about 2% CPU, even though the active page is backgrounded and its timers are throttled to 1Hz. Looking at the chrome://tracing trace the browser process is spending time handling incoming audio. However no audio is audible, and there appears to be no way to make this audio audible. This becomes a problem as you open more of these types of pages, as the CPU burn is cumulative. If, for example, you open one of these pages 10 times (create 10 separate tabs), you get 10x the audio processing CPU burn. Is there some way to cut off this unneeded processing?
,
Apr 10 2017
Yeah, this is WebAudio related. The site is failing to suspend the WebAudio context. I think we should consider enabling the intervention we have on Android everywhere or building this more formally into WebAudio: https://cs.chromium.org/chromium/src/content/renderer/media/renderer_webaudiodevice_impl.cc?l=162 +rtoy
,
Apr 10 2017
Which URL did you test with? AFAICT, artechnica isn't using webaudio. theverge appears to be (with, possibly, a context without objects connected to it, including a dangling OscillatorNode).
,
Apr 10 2017
The arstechnica URL was https://arstechnica.com/.
,
Apr 10 2017
(possibly some ad that was on the page at the time was using WebAudio).
,
May 11 2017
+ojan for interventions.
,
Jun 20 2017
rtoy, do you still work on WebAudio? Can we do as dale suggests in comment 2?
,
Jun 20 2017
,
Jun 20 2017
see also issue 732450 , where I've made the same suggestion.
,
Jul 13 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9eef9cf2ba172c7fc8416aa6b78c5c6a4c610a21 commit 9eef9cf2ba172c7fc8416aa6b78c5c6a4c610a21 Author: Dale Curtis <dalecurtis@chromium.org> Date: Thu Jul 13 03:18:49 2017 Enable silent sink suspension for WebAudio everywhere. Previously this was only enabled on Android, but we've continued to see issues with sites in the wild wasting power with a silent audio context that they never suspend. BUG= 707462 , 732450 TEST=none Change-Id: I3ceba194be8f98b7b0a7078476fb5f000d262198 Reviewed-on: https://chromium-review.googlesource.com/568817 Reviewed-by: Bruce Dawson <brucedawson@chromium.org> Reviewed-by: Raymond Toy <rtoy@chromium.org> Commit-Queue: Dale Curtis <dalecurtis@chromium.org> Cr-Commit-Position: refs/heads/master@{#486251} [modify] https://crrev.com/9eef9cf2ba172c7fc8416aa6b78c5c6a4c610a21/content/renderer/media/renderer_webaudiodevice_impl.cc
,
Jul 13 2017
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by zqzh...@chromium.org
, Apr 7 2017