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

Switch docs to recommend mini_racer over execjs #428

Closed
justin808 opened this issue May 21, 2016 · 3 comments
Closed

Switch docs to recommend mini_racer over execjs #428

justin808 opened this issue May 21, 2016 · 3 comments
Milestone

Comments

@justin808
Copy link
Member

https://github.com/discourse/mini_racer might have a big speed up.

Let's try it out!

Any volunteers?

Performance

The bench folder contains benchmark.

Benchmark minification of Discourse application.js (both minified and unminified)

  • MiniRacer version 0.1
  • therubyracer version 0.12.2
$ ruby bench_uglify.rb
Benching with MiniRacer
MiniRacer minify discourse_app.js 13813.36ms
MiniRacer minify discourse_app_minified.js 18271.19ms
MiniRacer minify discourse_app.js twice (2 threads) 13587.21ms
Benching with therubyracer
MiniRacer minify discourse_app.js 151467.164ms
MiniRacer minify discourse_app_minified.js 158172.097ms
MiniRacer minify discourse_app.js twice (2 threads) - DOES NOT FINISH

Killed: 9

The huge performance disparity (MiniRacer is 10x faster) is due to MiniRacer running latest version of V8. In July 2016 there is a queued upgrade to therubyracer which should bring some of the perf inline.

Note how the global interpreter lock release leads to 2 threads doing the same work taking the same wall time as 1 thread.

@justin808 justin808 modified the milestones: 6.0, 6.1 May 21, 2016
@jbhatab
Copy link
Member

jbhatab commented Jun 2, 2016

That's a big improvement.

@justin808
Copy link
Member Author

@jbhatab Any chance that you can try this out? Maybe we can put this into v.7?

@justin808
Copy link
Member Author

@robwise Please post some notes here when you get a chance. @robwise told me that MiniRacer was much faster. We really need a PR with doc updates on this.

@justin808 justin808 changed the title Test out https://github.com/discourse/mini_racer Switch docs to recommend mini_racer over execjs Jul 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants