diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-07-31 10:53:35 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-31 10:53:35 -0400 |
commit | 2d57d69b9ed3adf1241074f7eb29a588bec817a2 (patch) | |
tree | 0c2b842d80dbb3324cef2f45fca5babe1eeb4014 /dev | |
parent | b99850ed54ecaa903a4bd1c2bcf3ae1cd405a3ed (diff) |
Improve dictionary importer (#1859)
* Optimize dictionary data parsing during import
* Use ArrayBuffer instead of string
* Add missing function for testing
Diffstat (limited to 'dev')
-rw-r--r-- | dev/database-vm.js | 4 | ||||
-rw-r--r-- | dev/translator-vm.js | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/dev/database-vm.js b/dev/database-vm.js index 0127bc8f..07d9bd5a 100644 --- a/dev/database-vm.js +++ b/dev/database-vm.js @@ -68,6 +68,10 @@ class Image { } } + removeAttribute() { + // NOP + } + async _delayTriggerLoad() { await Promise.resolve(); for (const callback of this._loadCallbacks) { diff --git a/dev/translator-vm.js b/dev/translator-vm.js index 49101cf0..3c3886ba 100644 --- a/dev/translator-vm.js +++ b/dev/translator-vm.js @@ -72,7 +72,7 @@ class TranslatorVM extends DatabaseVM { // Dictionary this._dictionaryName = dictionaryName; const testDictionary = createDictionaryArchive(dictionaryDirectory, dictionaryName); - const testDictionaryContent = await testDictionary.generateAsync({type: 'string'}); + const testDictionaryContent = await testDictionary.generateAsync({type: 'arraybuffer'}); // Setup database const dictionaryImporter = new DictionaryImporter(); |