Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: Performance Implications of Multiple V8ScriptEngines tied to single V8Runtime.

0
0
Greetings!

V8 runtimes do not support concurrent access; in fact, they block it. Multiple threads may access different runtimes concurrently.

Within a runtime, multiple engines support data separation, not concurrency. Creating a new engine within an existing runtime is a relatively cheap way to get a pristine script execution environment.

We're not aware of any limits on the number of engines within a runtime, but runtimes themselves are quite expensive, especially in 32-bit processes. For multithreaded applications we recommend that runtimes be managed similarly to worker threads (and in similar quantities).

When you use the V8ScriptEngine constructor, you get a new engine within a private runtime. Use the V8Runtime constructor and V8Runtime.CreateScriptEngine() to set up shared runtimes.

Good luck, and please feel free to send any additional questions our way!

Viewing all articles
Browse latest Browse all 2297

Latest Images

Trending Articles





Latest Images