2 ms·
Make sure you're running New Relic or another monitoring service that can give you some insight into various parts of your application. If you can't see what is
by tibbon 13y ago
Make sure you're running New Relic or another monitoring service that can give you some insight into various parts of your application. If you can't see what is slow, then you can't fix it.
Fixing bad queries (n+1 is a common thing that will get you in trouble), and caching API calls (Rail.cache.fetch is your friend) will help a ton.
Background any tasks that must be slow. I like using Resque/Redis myself.
At some point it helps to cache HTTP requests when possible too. I've been working trying to get a special Buildpack working with Nginx for better caching on Heroku, but I'm not done yet. Also make sure that you aren't serving static assets from Heroku, and you're using something like CloudFront for it.
Email me if you need more help. I can normally make these things fly.