rust-mozjs
a493d195 - Change Runtime::new to take a parent runtime

Commit
10 years ago
Change Runtime::new to take a parent runtime SpiderMonkey shares some data, such as the self-hosting compartment and read-only atoms, between runtimes - but only if a parent runtime is passed when calling `JS_NewRuntime`. This is important for both memory usage and performance: compiling the self-hosted JS takes more than 30ms on a desktop machine, so doing that every time, say, a worker is created is quite wasteful.
Author
Parents
Loading