RESOLVED FIXED 231314
Cache PannerNode's azimuth, elevation and coneGain
https://bugs.webkit.org/show_bug.cgi?id=231314
Summary Cache PannerNode's azimuth, elevation and coneGain
Chris Dumez
Reported 2021-10-06 11:15:26 PDT
Cache PannerNode's azimuth, elevation and coneGain for better performance. I have noticed while profiling https://downloads.scirra.com/labs/bugs/safaripannerquality/ that PannerNode::process() spends most of its CPU time under PannerNode::calculateAzimuthElevation(). We shouldn't have to re-calculate those properties for every rendering quantum.
Attachments
Patch (20.69 KB, patch)
2021-10-06 11:21 PDT, Chris Dumez
no flags
Patch (20.69 KB, patch)
2021-10-06 17:53 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2021-10-06 11:21:55 PDT
Geoffrey Garen
Comment 2 2021-10-06 16:31:37 PDT
Comment on attachment 440393 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=440393&action=review > Source/WebCore/Modules/webaudio/AudioListener.cpp:126 > +void AudioListener::updateDirtyState() I must be missing something, but it seems like this function says "if nothing has changed, then we are dirty", which is opposite how I usually understand the phrase "dirty" in rendering. What am I missing?
Chris Dumez
Comment 3 2021-10-06 16:33:17 PDT
Comment on attachment 440393 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=440393&action=review >> Source/WebCore/Modules/webaudio/AudioListener.cpp:126 >> +void AudioListener::updateDirtyState() > > I must be missing something, but it seems like this function says "if nothing has changed, then we are dirty", which is opposite how I usually understand the phrase "dirty" in rendering. What am I missing? Uh? I think I messed things up with a last minute patch clean up before uploading. I agree this looks backwards now.
Chris Dumez
Comment 4 2021-10-06 17:53:14 PDT
Chris Dumez
Comment 5 2021-10-06 18:17:42 PDT
The cache is being leveraged by imported/w3c/web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/panner-rolloff-clamping.html
Eric Carlson
Comment 6 2021-10-07 13:30:50 PDT
Comment on attachment 440461 [details] Patch r=me
EWS
Comment 7 2021-10-07 13:36:39 PDT
Committed r283740 (242662@main): <https://commits.webkit.org/242662@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 440461 [details].
Radar WebKit Bug Importer
Comment 8 2021-10-07 13:39:46 PDT
Note You need to log in before you can comment on or make changes to this bug.