Bug 166481
Summary: | WebAssembly: implement the IndexDB caching API | ||
---|---|---|---|
Product: | WebKit | Reporter: | JF Bastien <jfbastien> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED CONFIGURATION CHANGED | ||
Severity: | Normal | CC: | ashvayka, chi187, dpaddock, gauravdewan007, jfbastien, keith_miller, saam |
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | 168264 | ||
Bug Blocks: | 161709, 166480 |
JF Bastien
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-objects
‡ https://w3c.github.io/IndexedDB/#object-store
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Gaurav Dewan
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.
JF Bastien
*** Bug 178163 has been marked as a duplicate of this bug. ***
Sergey Rubanov
This could be closed per https://github.com/WebAssembly/spec/issues/821
IndexedDB should be replaced by Caching API