Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from May 23, 2016

Conversation

@tschneidereit
Copy link
Contributor

tschneidereit commented May 23, 2016

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

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.
@nox
Copy link
Member

nox commented May 23, 2016

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

@bors-servo r+

@bors-servo
Copy link
Contributor

bors-servo commented May 23, 2016

📌 Commit a493d19 has been approved by nox

@bors-servo
Copy link
Contributor

bors-servo commented May 23, 2016

Testing commit a493d19 with merge fae7efd...

bors-servo added a commit that referenced this pull request May 23, 2016
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.

r? @nox

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-mozjs/265)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented May 23, 2016

☀️ Test successful - travis

@bors-servo bors-servo merged commit a493d19 into servo:master May 23, 2016
1 check passed
1 check passed
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.