views:

496

answers:

5

Hi. I have huge Rails app on development right now, which run VERY slow on -e development. I use Mongrel as web server. Is there any way to speed up a little bit everything? Because i have to wait 3-10 sec. to reload a page. Thanks.

+11  A: 

This is the answer to all of your woes:

http://github.com/thedarkone/rails-dev-boost/tree/master

fig
oh yeah!! you make my day!
r13
now I need the same boos for my fingers after sleepless night :)
r13
No plugin for that, unfortunately :)
fig
absolutely fantastic tip. thank you
efalcao
A: 

A very simple way to get a speed boost is to turn on class caching in development mode...

In config/environments/development.rb: config.cache_classes = true

That means Rails won't reload all the models/controllers/etc. on every request, so it'll go a lot faster, but it means you have to stop/start your server to see changes to anything except views.

Ezran
A: 

Perhaps also some things need some optimising if you are taking 3-10 seconds to render an action locally.

railsninja
A: 

I think if you're on Vista, Mongrel has performance issues when bound to all addresses (0.0.0.0)

Bind to 127.0.0.1 or your real I.P. (mongrel -b 127.0.0.1 -p 3000 -e development) and see if it makes a difference.

Also, if you have a connection intensive software currently open, like bittorent with a lot of open connections, your network interface might reach a maximum number of connection and slow down Mongrel. Closing bittorent, then maybe even rebooting, might fix your problem.

Mahoua
Nope. I'm on MBP with 4GB RAM. As for bittorent. Thank you for that, that make sense.
r13
A: 

If you're on windows, use some mingw builds of Ruby http://rubyinstaller.org/downloads/

If you're on linux, this might be helpful for running tests

http://github.com/candlerb/snailgun/tree/master

rogerdpack
Are mingw builds faster compared to the ones from one-click installer from ruby-lang.org ?
dolzenko
on the one-click page you have "RC2" which is mswin (slow, stable) and the "technology preview" versions, which are mingw (faster, newer).
rogerdpack