Skip to content

Instantly share code, notes, and snippets.

@benjamintanweihao
Created January 12, 2012 01:22
Show Gist options
  • Save benjamintanweihao/1597877 to your computer and use it in GitHub Desktop.
Save benjamintanweihao/1597877 to your computer and use it in GitHub Desktop.
Faster Ruby 1.9.2!
# First get a baseline measurement
cd /your/rails/app
time script/rails runner "puts 1"
# Install a patched ruby
curl https://gist.github.com/raw/996418/e2b346fbadeed458506fc69ca213ad96d1d08c3e/require-performance-fix-r31758.patch > /tmp/require-performance-fix.patch
rvm install ruby-head --patch /tmp/require-performance-fix.patch -n patched
# ... get a cup of tea, this took about 8 minutes on my MBP
# Get a new measurement
cd /your/rails/app
rvm use ruby-head-patched
gem install bundler --no-rdoc --no-ri
bundle
time script/rails runner "puts 1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment