Skip to content

Instantly share code, notes, and snippets.

@ngty
Created February 8, 2012 07:24
Show Gist options
  • Save ngty/1766439 to your computer and use it in GitHub Desktop.
Save ngty/1766439 to your computer and use it in GitHub Desktop.
Enjoy a faster rails boot up :D
gemset=mayday
old_ruby=ruby-1.9.3-p0
new_ruby=ruby-1.9.3-p0-perf
# Get 30% boast for rails boot, see https://gist.github.com/1688857
export RUBY_HEAP_MIN_SLOTS=1000000
export RUBY_HEAP_SLOTS_INCREMENT=1000000
export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1
export RUBY_GC_MALLOC_LIMIT=1000000000
export RUBY_HEAP_FREE_MIN=500000
if [[ "`rvm current`" == "${old_ruby}@${gemset}" ]]; then
if [[ 0 == `rvm list | grep --color=never "$new_ruby" | wc -l` ]]; then
curl https://raw.github.com/gist/1688857/rvm.sh | sh
rvm use --create ${new_ruby}@${gemset}
bundle install
else
rvm use ${new_ruby}@${gemset}
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment