Turn relevant logic into WebAssembly modules
Decentraleyes doesn't have any problems with memory usage and performance, that's true, but that doesn't mean it can't take advantage of WebAssembly's superior performance.
For the implementation I think this should be fairly sufficient https://github.com/rustwasm/wasm-bindgen https://github.com/rustwasm/wasm-pack + adding a fallback to JS if WASM fails to load
Here you can see examples of commits by two famous extensions who did that same approach: https://github.com/EFForg/https-everywhere/pull/18093 https://github.com/gorhill/uBlock/commit/d7d544cda040bb79aa3ab2591521bb1c43f57aaa