servo / rust-mozjs

DEPRECATED - moved to servo/mozjs instead.
Mozilla Public License 2.0
293 stars 122 forks source link

Change Runtime::new to take a parent runtime #265

Closed tschneidereit closed 8 years ago

tschneidereit commented 8 years ago

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.

r? @nox


This change is Reviewable

nox commented 8 years ago

Oh so that's why! Thanks for the explanation.

@bors-servo r+

bors-servo commented 8 years ago

:pushpin: Commit a493d19 has been approved by nox

bors-servo commented 8 years ago

:hourglass: Testing commit a493d19 with merge fae7efd...

bors-servo commented 8 years ago

:sunny: Test successful - travis