Skip to content

Instantly share code, notes, and snippets.

@charkost
Last active August 29, 2015 14:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save charkost/cb4f5baeb6529f37218c to your computer and use it in GitHub Desktop.
Save charkost/cb4f5baeb6529f37218c to your computer and use it in GitHub Desktop.
rbenv-ruby-1.9.3-p194-falcon-patch

Patched ruby 1.9.3-p194 for 30% faster rails boot

(updated 18/12/2014 urls from: https://gist.github.com/sj26/2600122)

Mac users: brew install gcc

curl https://gist.githubusercontent.com/charkost/cb4f5baeb6529f37218c/raw/d0331893dbae97ec63939e383f43d89b2ca838dc/rbenv.sh | sh && rbenv global 1.9.3-p194-perf

~/.bash_profile

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
build_package_combined_patch() {
local package_name="$1"
{
curl https://gist.githubusercontent.com/funny-falcon/2593385/raw/d635e7a667ce5d5c10808b0a15203603c49004f1/perf_and_gc.diff | patch -p1
autoconf
./configure --prefix="$PREFIX_PATH" $CONFIGURE_OPTS
make -j 8
make install
} >&4 2>&1
}
require_gcc
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz"
install_package "ruby-1.9.3-p194" "http://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz" combined_patch
curl https://gist.githubusercontent.com/charkost/cb4f5baeb6529f37218c/raw/46fcbe0a58d0f73fcbd45b4ef51dab6fdcf1e489/2-1.9.3-p194-patched.sh > /tmp/1.9.3-p194-perf
rbenv install /tmp/1.9.3-p194-perf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment