How can I check why Ruby suddenly runs so slowly on my machine?

I have been developing Ruby on Rails on my MacBook Pro for quite some time, but lately I've been starting to notice that everything is just forever.

Even simple things like rake -T take more than 30 seconds.

 $ time rake -T real 0m35.113s user 0m12.997s sys 0m1.828s 

When I do the same on my VPS, which has much less memory and CPU, it runs about three times faster. I am using Ruby 1.9.2 installed through RVM on OS X Lion.

Is there anything I can check / do to get some instant improvement? I was thinking about upgrading to SDD, but I don't want to make that decision too soon.

+4
source share
1 answer

It may be some kind of error in the gems, perhaps one that adds a lot of middleware.

It can help you.

Also, try installing 1.9.3, it should work better on boot.

Edit

Just wanted to add that if all else fails, [Mac Assistant] good ole strace can be useful.

+1
source

Source: https://habr.com/ru/post/1382704/


All Articles