Jose
Jose

Reputation: 599

Optimization tool for Rails 3 in development?

I'm developing a Rails 3 app deployed on Heroku which would like to optimize. I've explored different solutions such as query_reviewer or New Relic.

I couldn't make query_reviewer work with Rails 3.0.1 (also I had to switch to MySql, because PostgreSQL is not supported).

Regarding New Relic, it looks like a great free tool, but works only in production. I first need to improve many DB queries at development before getting to tune the app in production.

So none of this tools fit my needs.

Any advice? Maybe I should just rely on log traces and reduce the number of SQL queries?

Upvotes: 1

Views: 590

Answers (2)

Jose
Jose

Reputation: 599

I found that New Relic has a Development mode, which looks like an ideal setup for optimizing an application in development phase: http://support.newrelic.com/kb/docs/developer-mode

Upvotes: 0

Mike Dunlavey
Mike Dunlavey

Reputation: 40659

You want to find out which activities aren't absolutely necessary and would save a good amount of time if you could "prune" them?

Forgive me for being a one-track answerer, but there's an easy way to do that, and it's easy to demonstrate.

While the code is running slowly and making you wait, manually interrupt it with Ctrl-C or whatever, and examine the stack trace. Do this a few times.

Anything you see it doing on more than one stack trace is responsible for a substantial percent of time, and it doesn't really matter exactly how much. If it's something you could prune, it will have that much less work to do.

If the efficacy of this method seems doubtful because it's low-tech, that's understandable, but in fact it can quickly find any problem any profiler can find.

Upvotes: 1

Related Questions