Skip to content

Instantly share code, notes, and snippets.

@vangberg
Created February 13, 2012 20:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vangberg/1820022 to your computer and use it in GitHub Desktop.
Save vangberg/1820022 to your computer and use it in GitHub Desktop.
speedy rails console / rake / whatever.
# drop this in the top of yr config/boot.rb if you have plenty of RAM to spare.
if ENV["MANUAL_GC"].to_i == 1
GC.disable
Thread.new {
while true
sleep 2
GC.enable
GC.start
GC.disable
end
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment