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

Issue 707462 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Chrome spends CPU time on inaudible audio

Project Member Reported by shrike@chromium.org, Apr 1 2017

Issue description

Chrome 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?
 
trace_ars_technica_audio.json.gz
830 KB Download
Cc: avayvod@chromium.org dalecur...@chromium.org sande...@chromium.org
Cc: rtoy@chromium.org
Components: -Blink>Media>Audio Blink>WebAudio
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

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

Comment 4 by shrike@chromium.org, Apr 10 2017

The arstechnica URL was https://arstechnica.com/.
(possibly some ad that was on the page at the time was using WebAudio).
Cc: ojan@chromium.org
Status: Available (was: Untriaged)
+ojan for interventions.

Comment 7 by ojan@chromium.org, Jun 20 2017

Owner: rtoy@chromium.org
rtoy, do you still work on WebAudio? Can we do as dale suggests in comment 2?

Comment 8 by ojan@chromium.org, Jun 20 2017

Components: Programs>Alignment
see also  issue 732450 , where I've made the same suggestion.
Project Member

Comment 10 by bugdroid1@chromium.org, 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

Owner: dalecur...@chromium.org
Status: Fixed (was: Available)

Sign in to add a comment