MiniRacer https://github.com/discourse/mini_racer is ready for testing.
Can you help out measuring how it improves performance for rake assets:precompile
in your app?
- Run:
rm -fr public/assets
RAILS_ENV=production time bundle exec rake assets:precompile
- Edit
Gemfile
. Removetherubyracer
, add:
gem 'execjs', github: 'rails/execjs'
gem 'mini_racer'
-
bundle install
-
Run:
rm -fr public/assets
RAILS_ENV=production time bundle exec rake assets:precompile
Running in a small Rails 5 application (ruby 2.3.1p112) the command:
time RAILS_ENV=production bundle exec rake assets:precompile
(after running
rm -rf public/assets tmp/cache/assets
)therubyracer
30.90s user 0.91s system 100% cpu 31.744 total
system node (v4.4.4)
13.35s user 0.99s system 103% cpu 13.913 total
mini_racer
12.33s user 1.02s system 103% cpu 12.858 total