Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Keith and Marios Guide to Fast Websites

Keith Pitt
February 22, 2013

Keith and Marios Guide to Fast Websites

This is a presentation that @mariovisic (http://twitter.com/mariovisic) and I (http://twitter.com/keithpitt) performed at the first ever Ruby Conference Australia, 2013.

In the presentation, we take an open source web app (which currently loads in 9 seconds online) and try to make it load in under 2 seconds, using a variety of very easy techniques.

We also demonstrate how to measure performance accurately using open source tools.

You can watch the video of this presentation here: http://vimeo.com/61342267

You can get the full keynote presentation here: https://github.com/desktoppr/keith-and-marios-guide-to-fast-websites

Keith Pitt

February 22, 2013

More Decks by Keith Pitt

Other Decks in Programming


  1. Steve Souders “80-90% of the end user response time is

    spent on the frontend. Start there.”
  2. # config.ru require ::File.expand_path('...', __FILE__) use Rack::Deflater # add this

    line run Giftoppr::Application gzip (html, css, javascript)
  3. # Gemfile gem "carrierwave-processing" # app/uploaders/preview_uploader.rb class PreviewUploader < CarrierWave::Uploader::Base

    # ... process :convert => "jpg" process :strip process :quality => 80 end Compress Images
  4. # config/environments/production.rb config.action_controller.asset_host = "http://%d.assets.com" # config/initializers/carrierwave.rb CarrierWave.configure do |config|

    config.asset_host = lambda do lambda do |file| "http://%d.assets.com".gsub /%d/, (file.path.sum % 4).to_s end end end CDN (Multiple Hosts)