Mark Cohen is a CIO at Australia's largest online retailer and is a hands-on, sleeves-rolled-up, code-cutting geek. He lives in Sydney, Australia with his wife and boys and can sometimes be spotted puffing and panting as he runs at Maroubra Beach

#WDS09 – Speed Matters (Brain Dump)

Speed Matters – by @markstanto

Things to come back to and probably search for later :)

Some of the concepts to be aware of:

  • Empty cache / primed cache
  • Refresh / revisit
  • Page ready / page complete
  • Throughput / Latency

Latency – overhead costs in round trip to server, besides actual data change

Profiling page loads with firebug
Interesting change – css stays up top, js goes as far down the page as possible.

Cache Controls
- ETags (Entity tags)
- Apache / IIS support. (server config)

Server will say “not modified, us cached”
Only good for single-server

Expires tag: specific date (or timespan?)

Apache config:

  • ExpiresActive on
  • ExpiresDefault 365
  • outputfilterByType DEFLATE text/html text/css application/javascript <– case study 96KB reduction

Big No’s
pragma:”no-cache”
cache-control: set to zero

Minify JS

  • YIU ccompressor – 24 KB reduction on case study site, usually more.
  • Dojo Shrinksafe
  • YUI – calls itself safe, usually low-risk. but always test
  • Packer – most aggressive, most risky

- need to test all.

CompressorRater – tells you the savings using different algorithms
- use to choose best tool

GZip – only text files, not images

Split Components across Domains
- IE only 2 components at a time
- More than 3 aliases, DNS overhead counters benefit (we have much more than this)
Sprites
- composite images, use css to position

Restructure Content
- Delay loading of less imprtant stuff to later

Eg: Logo in css, images inline. logo shows after images.

Javascript rotator to lazy-load images (we should do this)

Recap

  • optimise images
  • combined js
  • combined css
  • js to bottom
  • cache control:expires
  • minify
  • gzip
  • split domains (CDN)

Tools

  • CacheStatus
  • PageSpeed
  • Firebug
  • LiveHTTPHeaders
  • CharlesProxy

http://stevesouders.com
http://developers.yahoo.com/performance/

Roll-up:

3 comments:

  1. Lucas Ng, 7. October 2009, 23:37
     

    Of course speed matters!
    http://glinden.blogspot.com/2009/06/new-google-study-on-speed-in-search.html
    Amazon, Google, and Yahoo A/B tests on the impact of speed reductions: “Long story short: even the smallest delay kills user satisfaction.”

     
  2. Paul Wakeford, 8. October 2009, 2:48
     

    “Cache Controls
    - ETags (Entity tags)
    - Apache / IIS support. (server config)

    Server will say “not modified, us cached”
    Only good for single-server”

    Not true – in IIS (and Apache, I’m sure, but I don’t know the method) you can sync your etags across a farm using a metabase entry. We do this as part of our standard build.

     
  3. Mark Cohen, 8. October 2009, 3:08
     

    Paul, that’s why you’re the pro and I’m the amateur ;)

    Lucas, I think his point was not whether speed matters, it was “Speed Matters” EOM. :)

     

Write a comment: