So. You want faster rails tests so you can spend less time waiting for rake and more time sipping gatorpagne. I get it.
Add the following to your .bash_profile. It's based off the 37 signals REE tuning.
# Ruby GC Tuning
export RUBY_HEAP_MIN_SLOTS=600000
export RUBY_GC_MALLOC_LIMIT=59000000
export RUBY_HEAP_FREE_MIN=100000
This step by itself improves performance quite a bit.
Follow Funny Falcon's guides to performance improvements.
My Patch will work with CM2.
Follow Jamis' Guide to faster tests for, scrub_instance_variables. code.
- On a Mac I used
/usr/local/mysql/support-files/my-huge.cnfas a base and setinnodb_buffer_pool_size=1G, which was about 10x what it was before. - This change went from having tests take: 24 minutes, 39.146 seconds to 12 minutes, 41.172 seconds on our integration server.
Detailed Results with Analysis
Net Results