0

Which gem do you install or which configuration do you change to optimize your Ruby on Rails applications on the Cedar stack of Heroku?

Like adding Rack::Deflater...

Camille
  • 678
  • 6
  • 23
  • 1
    define 'optimize'. What are you trying to achieve? – John Beynon Feb 25 '12 at 14:03
  • @JohnBeynon All the simple ways we have to improve the user experience on a classical Rails app deployed on Heroku Cedar – Camille Feb 25 '12 at 14:07
  • heroku encourages you to use rack-cache with memcache: http://www.saturnflyer.com/blog/jim/2010/06/24/rack-cache-on-heroku-with-memcached/ – phoet Feb 26 '12 at 11:25

2 Answers2

1

There is no specific optimization applied for Cedar stack currently, but there are many way you can optimize your Rails app, including:

  • Optimizing the client's side of your app, e.g.: techniques like CSS sprite, reduce number of files loading, compress your html code etc. You can benchmark use tool like Page Speed

  • Optimizing your app using caching: there are many database queries that you will need to cache to make it most efficient and fastest. You can cache Views and different other things also, you can find more on Rails Caching

  • Optimizing database: there will be table that you have not add correct indexing etc... so be sure that the query is optimized (especially those join queries), and there is suitable indexing

You knows who
  • 885
  • 10
  • 18
0

To be honest, there's nothing specific to optimising Rails for Heroku that isn't part of regular optimising for Rails on it's own.

A fair amount of general best practise can be found here: http://railslab.newrelic.com/

The only thing worth mentioning specifically for Heroku is regarding dyno blocking uploads.

Neil Middleton
  • 22,105
  • 18
  • 80
  • 134