gwenzlau/bklp — pull request #9 by phawk (2014-01-11 12:39:20+00:00)
Title: Debug and sort out performance issues

Hey, short summary of performance issues and what I have done to solve them:

## Assets

* The CSS and JavaScript weren't being compressed into a single file, I have sorted this by using the asset pipeline includes instead of adding a new `javascript_include_tag` each time.
* The assets weren't being served from a CDN. I have added these with the [asset_sync]() gem to be pushed to your S3 bucket bklp each time you deploy, this keeps those requests away from heroku and to a fast CDN, speeding things up a lot.
* The Assets weren't being cached, so users browsers had to download the full assets each time, I have added a line in config/enviornments/production.rb to ensure assets have a long life cache.

## Database

* 3 Tables (Links/Reviews/Recommendations) didn't have indexes on their foreign keys leading to slow DB querys

## Goodreads API

* There isn't much you can do about this, it is going to remain a bootleneck compared to the rest of the app, and if the goodreads API has downtime a lot of things aren't going to work. It would take a decent amount more effort to store data locally each time good reads is hit and then you have your own backup of this data, but it's probably not something worth doing just yet.