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

Web Performance - A look inside Yahoo!

holydevil
August 11, 2012

Web Performance - A look inside Yahoo!

A look at some of the key changes that has given us best results. The talk also covers some cool APIs for hackers.

holydevil

August 11, 2012
Tweet

More Decks by holydevil

Other Decks in Technology

Transcript

  1. • Revisit 80-20 • How we speed-up pages • Tools

    and APIs for hackers • Questions Agenda
  2. 80/20 in 2006 0% 25% 50% 75% 100% Yahoo! Google

    MySpace MSN Ebay Amazon Youtube CNN 85% 91% 62% 95% 95% 91% 75% 90% 15% 9% 38% 5% 5% 9% 25% 10% Backend Frontend * * everything except backend
  3. 80/20 in 2012 0% 25% 50% 75% 100% Yahoo! Google

    MySpace MSN Ebay Amazon Youtube CNN 94% 91% 82% 92% 92% 95% 85% 88% 6% 9% 18% 8% 8% 5% 15% 12% Backend Frontend * * everything except backend
  4. If your users are in India - don’t make them

    go all the way to west coast and come back
  5. Usage <script  src="boomerang.js"  type="text/ javascript"></script> <script  type="text/javascript"> BOOMR.init({    

    beacon_url:  "http://yoursite.com/path/ to/beacon.gif"   }); </script> lognormal.github.com/boomerang/doc/ Documentation :
  6. Boomerang plugins Plugins : * W3C Navigation timing API support

    * Measure DNS latency * Measure load time pre-rendered by Chrome <your plugin here> lognormal.github.com/boomerang/doc/howtos/
  7. YSlow Open source github.com/marcelduran/yslow/ Mozilla Firefox add-on Google Chrome extension

    Mobile/Desktop browser bookmarklet Opera extension Apple Safari extension and more ...
  8. YSlow commandline Installation $  npm  install  yslow  -­‐g Use $

     yslow  file.har  -­‐i  grade  -­‐f  plain
  9. YSlow commandline Example $  yslow  -­‐i  info  -­‐f  plain  yahoo.har

      size:  629.4K  (629408  bytes) overall  score:  A  (95) url:  http://www.yahoo.com/ # of requests: 91 ruleset:  ydefault page  load  time:  4750
  10. YSlow + PhanthomJS $  brew  update  &&  brew  install  phantomjs

      Install PhantomJS (Headless webkit with JS API) $  phantomjs  yslow.js  -­‐-­‐help Help
  11. $  phantomjs  yslow.js  -­‐i  basic  \  -­‐f  plain  http://flic.kr  

    Example YSlow + PhanthomJS size:  242.8K  (242889  bytes) overall  score:  A  (94) url:  http://www.flickr.com/ # of requests: 11 ruleset:  ydefault page  load  time:  1730
  12. Google PageSpeed Insights 1. Create API Key 2. $ curl

    "https://www.googleapis.com/pagespeedonline/v1/ runPagespeed?url=http://code.google.com/speed/page-speed/ &key=yourAPIKey" 3. { "kind": "pagespeedonline#result", "id": "http://code.google.com/speed/page-speed/", "responseCode": 200, "title": "PageSpeed Home", "score": 90, ... Documentation: tinyurl.com/pagespeedinsights