V8 release v6.5: Streaming compilation for WebAssembly code
admin last edited by admin
he WebAssembly API provides a special function to support streaming compilation in combination with the fetch() API:
const module = await WebAssembly.compileStreaming(fetch('foo.wasm'));
This API has been available since V8 v6.1 and Chrome 61, although the initial implementation didn’t actually use streaming compilation. However, with V8 v6.5 and Chrome 65 we take advantage of this API and compile WebAssembly modules already while we are still downloading the module bytes. As soon as we download all bytes of a single function, we pass the function to a background thread to compile it.