Bug 166481

Summary: WebAssembly: implement the IndexDB caching API
Product: WebKit Reporter: JF Bastien <jfbastien>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: chi187, dpaddock, gauravdewan007, jfbastien, keith_miller, sbarati, shvaikalesh
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 168264    
Bug Blocks: 161709, 166480    

Description JF Bastien 2016-12-26 09:39:44 PST
As described here: https://github.com/WebAssembly/design/blob/master/JS.md#structured-clone-of-a-webassemblymodule

> Structured Clone of a WebAssembly.Module
> A WebAssembly.Module is a cloneable object† which means it can be cloned between windows/workers and also stored/retrieved into/from an IDBObjectStore‡. The semantics of a structured clone is as-if the binary source, from which the WebAssembly.Module was compiled, were cloned and recompiled into the target realm. Engines should attempt to share/reuse internal compiled code when performing a structured clone although, in corner cases like CPU upgrade or browser update, this may not be possible and full recompilation may be necessary.
> Given the above engine optimizations, structured cloning provides developers explicit control over both compiled-code caching and cross-window/worker code sharing.

† https://html.spec.whatwg.org/multipage/infrastructure.html#cloneable-objectshttps://w3c.github.io/IndexedDB/#object-store
Comment 1 Gaurav Dewan 2017-10-11 04:22:08 PDT
This can give a great push to startup time as mentioned in
For example startup time of webassembly app which takes 2+ sec on Safari 11 on a latest fast mac machine gets loaded from indexeddb in less than 200 milliseconds.
Comment 2 JF Bastien 2017-10-11 09:02:11 PDT
*** Bug 178163 has been marked as a duplicate of this bug. ***
Comment 3 Sergey Rubanov 2019-02-19 12:25:23 PST
This could be closed per https://github.com/WebAssembly/spec/issues/821

IndexedDB should be replaced by Caching API