| Summary: | Web Audio panner node quality deteriorates over time | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Ashley Gullen <ashley> | ||||
| Component: | Web Audio | Assignee: | Chris Dumez <cdumez> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | cdumez, eric.carlson, ews-watchlist, glenn, jer.noble, kevin_neal, philipj, sergio, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | Other | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| See Also: |
https://bugs.webkit.org/show_bug.cgi?id=230966 https://bugs.webkit.org/show_bug.cgi?id=227199 https://bugs.webkit.org/show_bug.cgi?id=231314 |
||||||
| Attachments: |
|
||||||
|
Description
Ashley Gullen
2021-09-29 06:00:18 PDT
I see a large number of AudioBufferSourceNodes getting allocated and seemingly not be deallocated. WebKit may be leaking them. I don't see the JS wrappers from this AudioBufferSourceNodes getting garbage collected on JS side. Is the script holding on to these AudioBufferSourceNodes somehow? These nodes have an internal buffer so they can use a lot of memory. I don't believe the script is leaking anything. We do have wrapper objects that represent a playback, and the AudioBufferSourceNodes is held in the wrapper, and the wrapper objects get reused (from a quick debug it looks like it creates about 11 and then cycles through them). But both a new playback and the onended handlers disconnect the AudioBufferSourceNode and null it out. So old nodes should be disconnected and garbaged. AFAIK this issue only affects Safari - other browsers seem to handle it OK. I was wrong. This seems to be related to PannerNode automation. PannerNode processing takes longer and longer because events accumulate in the PannerNode's AudioParam's timelines. I'll look into this. I bet we need to add logic to AudioParamTimeline to clean up events. Created attachment 439738 [details]
Patch
Committed r283322 (242347@main): <https://commits.webkit.org/242347@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 439738 [details]. |