[rspec-users] (rspec2/rails3) spec'ing the details of a controller that is not purely *skinny* by design.
Wincent Colaiuta
win at wincent.com
Sat Jul 10 10:05:31 EDT 2010
El 10/07/2010, a las 12:21, Wincent Colaiuta escribió:
> I think the biggest speed gain wouldn't be from doing more mocking and stubbing, but actually from swapping in an in-memory database instead of MySQL. Not sure how hard that would be, to be honest. (Wondering if it's possible to run get MySQL to run from a RAM disk, seeing as I unfortunately do have some MySQL-specific stuff in there that prevents me from swapping away from it for testing.)
So I thought I'd try setting this up based on notes found here (nothing Rails specific here, post is written by a Django developer):
http://kotega.com/blog/2010/apr/12/mysql-ramdisk-osx/
Alas, the before-and-after timings don't bring the kind of speed up I was hoping for:
normal disk
real 2m51.720s
user 2m30.692s
sys 0m2.653s
ram disk
real 2m42.268s
user 2m31.590s
sys 0m2.499s
It's possible that one could get better performance by tuning some MySQL parameters, but I am sceptical about the gains being very impressive.
Cheers,
Wincent
More information about the rspec-users
mailing list