#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:
- Low hanging fruit
- incremental improvements
- Incorporate into your process – ie in Ant, include in deployment process.
- http://delicious.com/markstanton/speed-talk
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.”
“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.
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.