jelmervdl / translatelocally-web-ext

TranslateLocally for the Browser is a web-extension that enables client side in-page translations for web browsers.
https://addons.mozilla.org/en-GB/firefox/addon/translatelocally-for-firefox/
Mozilla Public License 2.0
65 stars 3 forks source link

Use .tar.gz models from translatelocally.com #7

Closed jelmervdl closed 2 years ago

jelmervdl commented 2 years ago

Proof-of-concept download the .tar.gz files, extract those in memory, parse the YAML file to find the filenames, and then just continue as normal.

The whole finding the right file, and not actually reading the config file in detail, is pretty much a quick hack to make it just work for now.

jelmervdl commented 2 years ago

Also that loadTranslationModel function is called once for each worker, so effectively with 4 workers I'm now extracting the tarball 4 times 😅

Performance recording: https://share.firefox.dev/3HWms77 (tested on Wikipedia)