Re: AudioNode GC rules

On Wed, Mar 20, 2013 at 10:49 PM, Srikumar Subramanian <srikumarks@gmail.com
> wrote:

> For code like the granular synthesis example which creates tens of
> nodes or perhaps hundreds of nodes every second, I would expect the
> performance of the code to be determined by how early the nodes are
> released.


I don't think that's necessarily the case.


> If it is purely left to the GC to do this, I'm not sure the
> example would be viable with most JS engines. Would it be worth making
> implementation suggestions that would make this case performant
> without having to talk about GC and references?
>

You mean asking that implementation be able to handle creating hundreds of
nodes per second?  I don't think that is something that the spec should
mandate, and it is definitely possible to implement that efficiently (at
least, I believe that the Gecko implementation is now able to handle that
workload easily.)  Also note that an implementation may choose a different
memory management strategy for nodes that are no longer accessible through
Javascript, but as long as the behavior is not observable from JS, I don't
think that the spec needs to say anything about that.

--
Ehsan
<http://ehsanakhgari.org/>

Received on Thursday, 21 March 2013 04:17:02 UTC