Closed guest271314 closed 3 years ago
Virtual F2F:
@padenot Or, expose Response
and fetch
in Worklet
/AudioWorkletGlocalScope
. Hundreds of thousands to millions of MessagePort
events and message events is more than likely more expensive than just fetching the input data in AudioWorkletGlobalScope
. The design pattern appears to have neglected to consider how to get substantial amounts (potentially an infinite stream) of input data data to AudioWorkletProcessor
.
If Response
and fetch
cannot be defined in AudioWorkletGlobalScope
every effort should be made to concretely implement transferable streams to replace the expensive MessagePort
implementation. Though we should be able to compare fetch
and Response
in AudioWorkletGlobalScope
to using WebAssembly
, Atomics
and SharedArrayBuffer
to base conclusions about performance on evidence rather than assumptions.
TPAC 2020:
Another option is to expose Response
in AudioWorkletGlobalScope
. Then blob()
and formData()
would need the same non-exposure becaude Blob
is not defined in that context either. After thousands of experimental runs I do not have any evidence to support the propostion that Response
or fetch()
in AudioWorklet
will break the API.
The streaming version already excludes the WGS: https://webassembly.github.io/spec/web-api/index.html#streaming-modules
Nothing actionable here in terms of the spec change - the spec seems sufficient, but the implementations do not reflect it correctly. I filed an issue against Chromium: https://crbug.com/1144249
Gecko bug to remove those: https://bugzilla.mozilla.org/show_bug.cgi?id=1711945. I'm closing this, since both implementations are wrong.
Describe the issue
both return
true
at Nightly 78 and Chromium 81.However, those methods cannot be used in
AudioWorkletGlobalScope
without throwing aTypeError
becauseResponse
is not defined inAudioWorkletGlobalScope
https://webassembly.org/docs/web/#process-a-potential-webassembly-response
Specification authors object to defining
fetch()
, thusResponse
, inAudioWorkletGlobalScope
where the methods now are only capable of throwing aTypeError
per theWebAsssembly
specification, thus should be removed fromAudioWorkletGlobalScope.WebAssembly
implementation.Where Is It
https://webassembly.org/docs/web/#additional-web-embedding-api
Additional Information
Where specification authors appear to be in firm agreement to not define
fetch()
, and thusResponse
, inAudioWorkletGlobalScope
https://github.com/WebAudio/web-audio-api-v2/issues/73, where if that decision remains unchangedcompileStreaming()
andinstantiateStreaming()
will always only throw aTypeError
rendering the methods useless inAudioWorkletGlobalScope
.The
WebAssembly
specification provides the solution to the bug "both absent" must apply in this case.If the specification authors conclude that a
TypeError
being thrown forWebAssembly.compileStreaming()
andWebAssembly.instantiateStreaming()
which is the only possible outcome due toResponse
not being defined inAudioWorkletGlobalScope
at a minimum a note should be included in the specification to notify users that whilecompileStreaming()
andinstantiateStreaming()
are defined methods withinAudioWorkletGlobalScope
using either will only result in aTypeError
being thrown asResponse
is not defined in theAudioWorkletGlobalScope
.