This is a work-in-progress talk, subject to changes.
First given at RubySG's meetup on 27 Jan, 2015.
Fast Rails(Beta)
View Slide
FrontendBackendDatabase
This slide intentionally left blank.
Front End
PageSpeed!https://developers.google.com/speed!YSlow!http://yslow.org/
Asset Pipeline!Far Future ExpiresMinify JavaScript + CSSMinimize HTTP RequestsMultiple Asset Hosts(http://api.rubyonrails.org/classes/ActionView/Helpers/AssetUrlHelper.html)
Compression!http://nginx.org/en/docs/http/ngx_http_gzip_module.htmlhttps://github.com/romanbsd/heroku-deflater
CDN!Static AssetsDynamic Content
Browser Caching!`expires_in`, `expires_now`, `fresh_when`, `stale?`(http://api.rubyonrails.org/classes/ActionController/ConditionalGet.html)
Assets Loading!Stylesheets at the TopJavaScripts at the Bottom (async)
Images!`gem install smusher`Lazy Load
FOUT!(Flash of Unstyled Text)https://github.com/typekit/webfontloader
Turbolinks!mmmm…
Backend
Update!Ruby 2.2.0Rails 4.2
Memory!ServerDatabase
Background Jobs!Email/Image Processing
Data Storage!Save to S3?Delete from S3?
Caching!Russian Doll CachingLow-Level Caching
Views!helpers (inline) > partials > loop`render ‘article’, collection: @articles`
Fast Ruby!https://github.com/JuanitoFatas/fast-ruby
Fast Code!`exists` vs. `present?`Loop in Code vs. SQL
Development!`spring`, `guard`
Database
ActiveRecord!Foreign Keys, Composite Keys, SQL Explain`find`/`find_by`/`find_by_` vs. `where(..).take`
Indexes!Foreign Keys, Composite Keys, SQL Explainhttps://github.com/eladmeidar/rails_indexes
n+1!`gem install bullet`
The End(Beta)