New issue
Advanced search Search tips

Issue 592787 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Reduce memory usage of PannerNode when not using HRTF panner model.

Project Member Reported by rtoy@chromium.org, Mar 7 2016

Issue description

Currently, when a PannerNode is created, the HRTF database is loaded, even if the user never selects the HRTF panning model. (Default is equalpower.)

According to https://codereview.chromium.org/176683003/, this uses 30MB of memory, which is quite a lot for a mobile device.  Fortunately, this is shared between all PannerNodes in the graph.

Consider creating the database only when the user selects the HRTF panner.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 23 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6610df622ffb33ade51e5ccdb92b7d6b0e2b81ce

commit 6610df622ffb33ade51e5ccdb92b7d6b0e2b81ce
Author: rtoy <rtoy@chromium.org>
Date: Sat Jul 23 00:01:06 2016

Load HRTF database only when the panner is set to HRTF

Currently, the creation of any panner node causes the HRTF database to
be loaded.  However, the default panning model is "equalpower" (about
99.8%) so loading the database is a waste of time and memory.
(According to https://codereview.chromium.org/176683003/, it takes
30MB to hold the database.)

Thus, only load the HRTF database when the panning model is set to
HRTF.

Can't test this easily, but did verify with a debugger that the
database is only created when the panning model is set to HRTF and not
before.

BUG= 592787 
TEST=none

Review-Url: https://codereview.chromium.org/2171703003
Cr-Commit-Position: refs/heads/master@{#407307}

[modify] https://crrev.com/6610df622ffb33ade51e5ccdb92b7d6b0e2b81ce/third_party/WebKit/Source/modules/webaudio/AudioListener.cpp
[modify] https://crrev.com/6610df622ffb33ade51e5ccdb92b7d6b0e2b81ce/third_party/WebKit/Source/modules/webaudio/PannerNode.cpp

Comment 2 by rtoy@chromium.org, Jul 25 2016

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

Sign in to add a comment