Keith and Marios Guide to Fast Websites

E14f55d3f939977cecbf51b64ff6f861?s=47 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

E14f55d3f939977cecbf51b64ff6f861?s=128

Keith Pitt

February 22, 2013
Tweet

Transcript

  1. 2.
  2. 3.
  3. 4.
  4. 5.
  5. 8.
  6. 11.
  7. 13.
  8. 14.
  9. 18.

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

    spent on the frontend. Start there.”
  10. 19.
  11. 22.
  12. 26.
  13. 28.
  14. 29.
  15. 30.
  16. 32.
  17. 33.
  18. 35.
  19. 37.
  20. 38.
  21. 39.

    # config.ru require ::File.expand_path('...', __FILE__) use Rack::Deflater # add this

    line run Giftoppr::Application gzip (html, css, javascript)
  22. 40.
  23. 41.
  24. 42.
  25. 43.

    # 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
  26. 46.
  27. 47.
  28. 48.
  29. 50.
  30. 51.
  31. 53.
  32. 54.
  33. 59.
  34. 61.
  35. 62.
  36. 63.

    # 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)
  37. 66.
  38. 67.
  39. 71.
  40. 72.
  41. 74.
  42. 78.
  43. 79.
  44. 80.
  45. 82.