Rails Running Slower in Dev?

Does Rails run so slower in the Development environment?
Rails allows you to setup 3 environments each with its own database, error loggin etc. So you have Production, Development and Testing.

Running an application in development shouldn’t be slow - but depending on how you built the app - a request to the server may load the entire app. There are other factors of course to consider. Are your queries effecient, code clean and any delays non-rails related?

I remember we were building an new backend once and the app kept freezing up in the Development environment only. It ended up being a problem with IE that once diagnosed was easily fixed. So make sure you take a good look around to diagnose the cause of your problem - as rails is typically not the reason for an application to freeze up.

So the short answer no - but if you’re developing in a way where the development environment is relying heavily on server requests (live) as opposed to on your local machin - you’re going to see delays until you move to production.

2 Responses to “Rails Running Slower in Dev?”

  1. Tim Harper Says:

    Good article. It’s also noteworthy to point out that in Dev mode, models and controllers are not cached once their compiled. They are re-parsed and recompiled once per use per request.

    In production mode, it’s not so. Controllers and models are all parsed and compiled on startup, and then reused until the end of the process life.

  2. Shad Says:

    Point well made. Thanks for the clarification Tim.

Leave a Reply

You must be logged in to post a comment.