Created
February 13, 2012 20:35
-
-
Save vangberg/1820022 to your computer and use it in GitHub Desktop.
speedy rails console / rake / whatever.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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