Bug 166481 - WebAssembly: implement the IndexDB caching API
Summary: WebAssembly: implement the IndexDB caching API
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
: 178163 (view as bug list)
Depends on: 168264
Blocks: 161709 166480
  Show dependency treegraph
 
Reported: 2016-12-26 09:39 PST by JF Bastien
Modified: 2019-02-19 12:25 PST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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
https://bugs.webkit.org/show_bug.cgi?id=178163
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