Re: AudioNode GC rules

On Mar 20, 2013, at 10:56 PM, Kumar <srikumarks@gmail.com> wrote:

> The benefit of the current "dynamic lifetime" prescription is that these finished nodes propagate finishedness by disconnecting their outputs, thereby eliminating checks that the destination would otherwise have to do. So rephrasing the "dynamic lifetime" mechanism as a "finishedness proagation" mechanism might get the benefits without having to touch on GC related issues, freeing up implementors to choose from a wider range of techniques.

> I'd like to preserve the kind of performance you get in the current webkit implementation due to the "dynamic lifetime" aspect. I've triggered a thousand source node "grains" per sec on a macbook air with no problems. It would be a pity to water that down.

As a point of reference, WebKit already propogates that information through the render tree[1], and "finished" nodes effectively disconnect their outputs by propogating silence to upstream nodes. This optimization is orthoginal to either the spec'd lifetime rules or the standard JavaScript garbage collection mechanism, and would continue no matter which lifetime management model was specified.

-Jer

[1] See propogatesSilence(): http://trac.webkit.org/browser/trunk/Source/WebCore/Modules/webaudio/AudioNode.h#L159

Received on Friday, 22 March 2013 09:31:40 UTC