Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
None
-
None
Description
Is it possible to save in permanent storage ( OPFS, IndexedDB or somewhere else ) downloaded/compiled WASM module?
In general, optimization looks like :
1. When building app, beside app.html, app.js, qtloader.js and app.wasm, generate also app.wasm.md5 file ( or sha1, or whatever ) containing WASM file checksum.
2. When loading app.html at first time, save app.wasm and app.wasm.md5 to somewhere permanent ( indexedDB in the best case ).
3. In subsequent loads, compare local *.md5 checksume with remote ones and download app.wasm only if checksums are different.
Also it is good idea to store already compiled WASM module if possible (instead of downloaded app.wasm, to avoid recompiling intermediate bytecode to CPU instructions )
Another good idea to be able configure caching/storing in app build stage ( qmake/cmake variables, or somehow else )