Use ASM only (experiment)

Former-commit-id: d27bc1d7e935a10cf1ab15f9f4e819300823baf7
This commit is contained in:
Jaifroid 2022-11-28 09:48:46 +00:00
parent ba09842b26
commit bdde94a47d
4 changed files with 5 additions and 2 deletions

View File

@ -227,7 +227,9 @@ if ('WebAssembly' in self) {
} else {
precacheFiles.push(
"www/js/lib/xzdec-asm.js",
"www/js/lib/zstddec-asm.js"
"www/js/lib/zstddec-asm.js",
"www/js/lib/libzim-asm.js",
"www/js/lib/libzim-asm.js.mem"
);
}

View File

@ -0,0 +1 @@
d427a780021f37961e7a1ed0df634eadf2c02112

Binary file not shown.

View File

@ -93,7 +93,7 @@ define(['zimfile', 'zimDirEntry', 'transformZimit', 'util', 'uiUtil', 'utf8'],
var isSplitZim = /\.zima.$/i.test(that._file._files[0].name);
if ('WebAssembly' in self && that._file.fullTextIndex && !isSplitZim) {
console.log('Instantiating libzim Web Worker...');
libzimWorker = new Worker('js/lib/libzim-wasm.js');
libzimWorker = new Worker('js/lib/libzim-asm.js');
that.callLibzimWorker({action: "init", files: that._file._files})
.then(function () {
params.searchProvider = 'fulltext';