Currently AudioContextInfo is located at AudioWorkletProcessor, but it seems wasteful considering sampleRate and currentTime are identical to all instances in an AudioWorkletGlobalScope.
So I am proposing moving individual attributes of AudioContextInfo to AudioWorkletGlobalScope:
Calling AudioContextInfo() creates a dictionary, so accessing the primitive values directly should be more efficient and less wasteful. (in terms of GC)
Currently
AudioContextInfo
is located atAudioWorkletProcessor
, but it seems wasteful consideringsampleRate
andcurrentTime
are identical to all instances in anAudioWorkletGlobalScope
.So I am proposing moving individual attributes of
AudioContextInfo
toAudioWorkletGlobalScope
:Calling
AudioContextInfo()
creates a dictionary, so accessing the primitive values directly should be more efficient and less wasteful. (in terms of GC)