Your SlideShare is downloading. ×
0
MeasuringWeb PerformanceDave Olsen, @dmolsenWest Virginia UniversityHighEdWeb Floridahttp://flic.kr/p/7A8xxN
slideshare.net/dmolsenwvu
introduction about me@dmolsen
The Mobile Book• Covers everything mobile• Produced by SmashingMedia• Chapters by Peter-PaulKoch, Stephanie Rieger,Brad Fr...
What I’ll Talk About• Quick Intro About Why WeShould Care About Web Perf• Tools for Measuring WebPerformance• Setting Up a...
WHY SHOULD WE CARE ABOUTWEB PERFORMANCE?http://flic.kr/p/4JY1Yr
brad’s iceberg© Brad Frost© Brad Frost
The way in which CSS mediaqueries have been promoted formobile hides tough problemsand gives developers a falsepromise of ...
brad’s iceberg© Brad Frost© Brad Frost© Brad Frost
The average weight of a web page today.Source: HTTP ArchiveImages JavaScriptFlashHTMLCSSOther77%1.3 MB
RWD sites whosesmall screen designweighs the same as thelarge screen design.Source: Podjarny72%
Users expect yourmobile site to loadas quickly as yourdesktop site.71%Source: Gomez
Bounce RateConversionRate Cart Size PageViews200ms - - - -1.2%500ms -4.7% -1.9% - -5.7%1000ms -8.3% -3.5% -2.1% -9.4%CASE ...
Mobile first meansperformance first.(start thinking about performance at the design stage)
Over DownloadingDownload & HideDownload & ShrinkDownload & IgnorePRIMARY PERFORMANCE ISSUES FOR RWDPoor NetworksHigh Laten...
MOBILE OPTIMIZATIONFOCUS1. Reduce requests2. Reduce asset size3. Speed-up pagerenderhttp://flic.kr/p/4zzKee
BrowsercacheThe simplest way to reduce requests is to make surethe browser doesn’t need to make them. Make sureassets are ...
Best request is no request.Worst request is one thatblocks the parser.Source: Ilya Grigorik“”- Ilya Grigorik@ilyagrigorik
ImagecompressionUse a service like kraken.io to optimize images.Also use CSS sprites as appropriate.CompressHTML & CSSUse ...
Avoid DOMreflows &repaintsBy using JS to modify the DOM you can causeunnecessary reflows & repaints of your browser. Theys...
Testing Toolstoolbox, toolsWEB PERFORMANCETOOLShttp://flic.kr/p/4BZsQJ
DiagnosticToolsAutomatedTools
DiagnosticToolsAutomatedTools
LEARN TO LOVE THE INSPECTOR
DEVTOOLS CAN DO THAT?http://bit.ly/15sWYsx
FOLLOW ALONG BY OPENING THEDEVELOPER TOOLS IN CHROME
SAVE YOURSELF A HEADACHE &DISABLE CACHE WHEN TESTING
EXPLAINING THE NETWORK PANEL:RESOURCE SIZEtransferred sizereal sizere-order
EXPLAINING THE NETWORK PANEL:LATENCYlatency + downloadlatencyre-order
EXPLAINING THE NETWORK PANEL:EVENTSdomcontentloadedonload
EXPLAINING THE NETWORK PANEL:SAVING HAR FILES FOR COMPARISONsave HAR file locally
A narrower, shorterwaterfall is the goal.
http://flic.kr/p/bMdzZ2Test the squishy.default styles vs. min-width vs. max-width
Performancehttp://timkadlec.com/2013/01/setting-a-performance-budget/http://flic.kr/p/7BBs6eA budget is a guide, not a hard...
EXPLAINING THE TIMELINE PANEL
EXPLAINING THE PROFILES PANEL:CSS SELECTORS
EXPLAINING THE PROFILES PANEL:CSS SELECTORS
EXPLAINING THE AUDITS PANEL
PAGESPEED INSIGHTS EXTENSIONhttps://developers.google.com/speed/pagespeed/insights
REMOTE DEBUGGING
Google Analytics Site Speedhttp://www.httpwatch.comIE & FIREFOX PERFORMANCE ISSUES
Google Analytics Site SpeedGOOGLE ANALYTICS’ SITE SPEED
PERFORMANCE TESTING PROXIESMobitestWebPagetest
Google Analytics Site Speedhttp://www.slideshare.net/AndyDavies/web-page-test-beyond-the-basicsWebPagetest - BEYOND THE BA...
Google Analytics Site SpeedCUSTOMIZING WebPagetest:CAPTURING EVENTS AFTER ONLOAD
CUSTOMIZING WebPagetest:BLACKHOLES FOR REQUESTS
Google Analytics Site SpeedCUSTOMIZING WebPagetest:SCRIPTING & CUSTOM VIEWPORTS
CUSTOMIZING WebPageTest:VIDEO COMPARISON
CUSTOMIZING WebPageTest:VIDEO COMPARISON - SMALL VIEWPORT
mobile bookmarkletTHE ULTIMATE MOBILEPERFORMANCE BOOKMARKLET
charlesproxy.comSLOWING THINGS DOWNThrottleCharles
USING CHARLES PROXYhttp://blog.cloudfour.com/using-charles-proxy-to-examine-ios-apps/
TEST & OPTIMIZE JAVASCRIPT WITH JSPERFhttp://jsperf.com
W3C’s NAVIGATION TIMINGhttp://www.w3.org/TR/navigation-timing/http://www.html5rocks.com/en/tutorials/webperformance/basics/
DiagnosticToolsAutomatedTools
mod_pagespeed AUTOMATES A LOThttp://developers.google.com/speed/pagespeed/mod  add_head  combine_css   convert_jpeg_to_pro...
CodeKitCODEKIT: WEB PERF IN YOUR WORKFLOW  Optimize Images  Combine & MinifyFeatureshttp://incident57.com/codekit/
DEVICEShttp://flic.kr/p/cfkZhN
charlesproxy.comEMULATING MOBILE DEVICESEmulatorsBrowserStack
eBayMobileKarma.comCellphone store leftoversOpen device labsGET YOUR HANDS ONREAL DEVICEShttp://flic.kr/p/7972f6
OPENDEVICELAB.COM
Base on:WiFi-capable, AnalyticsRank, OS, ScreenDimensions, & CostSuggested focus:iPod Touch, mid-levelAndroid, high-end An...
ADOBE EDGE INSPECT(THE APP FORMERLY KNOWN AS ADOBE SHADOW)
RESS: AN EVOLUTION OFRESPONSIVE DESIGNhttp://slidesha.re/KtByzQ
WEB PERF TWEEPS TO FOLLOW@ilyagrigorik@andydavies@souders @patmeenan@stoyanstefanov@joshuabixby @yoavweiss@scottjehljust a...
Doug GapinskiStrategistmStoner@thedougcoSPECIAL THANKS TO...
QUESTIONS?
Dave OlsenProfessional TechnologistWest Virginia University@dmolsenTHANKS FOR LISTENING
Upcoming SlideShare
Loading in...5
×

Measuring Web Performance (HighEdWeb FL Edition)

2,146

Published on

Today, a web page can be delivered to desktop computers, televisions, or handheld devices like tablets or phones. While a technique like responsive design helps ensure that our web sites look good across that spectrum of devices we may forget that we need to make sure that our web sites also perform well across that same spectrum. More and more of our users are shifting their Internet usage to these more varied platforms and connection speeds with some moving entirely to mobile Internet.

In this session we’ll look at the tools that can help you understand, measure and improve the web performance of your web sites and applications. The talk will also discuss how new server-side techniques might help us optimize our front-end performance. Finally, since the best way to test is to have devices in your hand, we’ll discuss some tips for getting your hands on them cheaply.

This presentation builds upon Dave’s “Optimization for Mobile” chapter in Smashing Magazine’s “The Mobile Book.”

This talk was given at HighEdWeb Florida.

Published in: Technology, Design

Transcript of "Measuring Web Performance (HighEdWeb FL Edition)"

  1. 1. MeasuringWeb PerformanceDave Olsen, @dmolsenWest Virginia UniversityHighEdWeb Floridahttp://flic.kr/p/7A8xxN
  2. 2. slideshare.net/dmolsenwvu
  3. 3. introduction about me@dmolsen
  4. 4. The Mobile Book• Covers everything mobile• Produced by SmashingMedia• Chapters by Peter-PaulKoch, Stephanie Rieger,Brad Frost, Trent Walton,me & others• Door prize here!http://the-mobile-book.com
  5. 5. What I’ll Talk About• Quick Intro About Why WeShould Care About Web Perf• Tools for Measuring WebPerformance• Setting Up a Device Lab
  6. 6. WHY SHOULD WE CARE ABOUTWEB PERFORMANCE?http://flic.kr/p/4JY1Yr
  7. 7. brad’s iceberg© Brad Frost© Brad Frost
  8. 8. The way in which CSS mediaqueries have been promoted formobile hides tough problemsand gives developers a falsepromise of a simple solution fordesigning for small screens.Source: Jason Grigsby on Speakerdeck“”- Jason Grigsby@grigs
  9. 9. brad’s iceberg© Brad Frost© Brad Frost© Brad Frost
  10. 10. The average weight of a web page today.Source: HTTP ArchiveImages JavaScriptFlashHTMLCSSOther77%1.3 MB
  11. 11. RWD sites whosesmall screen designweighs the same as thelarge screen design.Source: Podjarny72%
  12. 12. Users expect yourmobile site to loadas quickly as yourdesktop site.71%Source: Gomez
  13. 13. Bounce RateConversionRate Cart Size PageViews200ms - - - -1.2%500ms -4.7% -1.9% - -5.7%1000ms -8.3% -3.5% -2.1% -9.4%CASE STUDY:MOBILE PERFORMANCE EFFECT ON BUSINESSSource: Web Performance Today
  14. 14. Mobile first meansperformance first.(start thinking about performance at the design stage)
  15. 15. Over DownloadingDownload & HideDownload & ShrinkDownload & IgnorePRIMARY PERFORMANCE ISSUES FOR RWDPoor NetworksHigh LatencyVariable BandwidthPacket Loss
  16. 16. MOBILE OPTIMIZATIONFOCUS1. Reduce requests2. Reduce asset size3. Speed-up pagerenderhttp://flic.kr/p/4zzKee
  17. 17. BrowsercacheThe simplest way to reduce requests is to make surethe browser doesn’t need to make them. Make sureassets are bring cached on the browser.ConcatenateJS & CSSCombine similar files together in one or multiple largerfiles to reduce requests. May harm performance too.Lazy loadcontentDon’t make requests until necessary. Filament Group’sAJAX Include Pattern or lazyBlock.data: URI For small images & fonts try embedding them in yourCSS file by using the data: URI.ConditionalloadingUse a resource loader like Modernizr.load toconditionally include JavaScript & CSS files.1. REDUCE REQUESTSFEPFEFEFE
  18. 18. Best request is no request.Worst request is one thatblocks the parser.Source: Ilya Grigorik“”- Ilya Grigorik@ilyagrigorik
  19. 19. ImagecompressionUse a service like kraken.io to optimize images.Also use CSS sprites as appropriate.CompressHTML & CSSUse mod_deflate to make sure text-based assets arecompressed for transfer.Try to avoidimagesWhen possible think about avoiding images.Implement with CSS or Canvas. Or use SVG orProgressive JPEGs.Minification Use a minifying service to make sure text-based assetsare as small as possible. If using PHP use Minify.MicroJS or,even better,Vanilla JSAvoid using bulky frameworks if you’re using them forsimple tasks like selectors. Try microjs.com to findlibraries that may be smaller & more suitable.JavaScript also blocks the rendering of the page.2. REDUCE ASSET SIZEPSSFEPFE
  20. 20. Avoid DOMreflows &repaintsBy using JS to modify the DOM you can causeunnecessary reflows & repaints of your browser. Theyslow down page render time as well as burn battery.Deferloading ofJavaScriptUse HTML5’s script defer & async attributes to delaydownloading files. Can also insert script elements intothe DOM using the onLoad event.Lazy loadJavaScriptComment out JavaScript that isn’t required at pageload. Uncomment & eval() when required.Touch beatsonClickWhile not directly related to page render, by makingsure your links use a Touch event rather than anonClick event user interactions will speed up by 300ms.Avoid SMwidgetsTry using simple links to services rather than utilizingthe JavaScript widgets. They’re performance hogs.3. SPEED-UP PAGE RENDERFEFEFEFEFE
  21. 21. Testing Toolstoolbox, toolsWEB PERFORMANCETOOLShttp://flic.kr/p/4BZsQJ
  22. 22. DiagnosticToolsAutomatedTools
  23. 23. DiagnosticToolsAutomatedTools
  24. 24. LEARN TO LOVE THE INSPECTOR
  25. 25. DEVTOOLS CAN DO THAT?http://bit.ly/15sWYsx
  26. 26. FOLLOW ALONG BY OPENING THEDEVELOPER TOOLS IN CHROME
  27. 27. SAVE YOURSELF A HEADACHE &DISABLE CACHE WHEN TESTING
  28. 28. EXPLAINING THE NETWORK PANEL:RESOURCE SIZEtransferred sizereal sizere-order
  29. 29. EXPLAINING THE NETWORK PANEL:LATENCYlatency + downloadlatencyre-order
  30. 30. EXPLAINING THE NETWORK PANEL:EVENTSdomcontentloadedonload
  31. 31. EXPLAINING THE NETWORK PANEL:SAVING HAR FILES FOR COMPARISONsave HAR file locally
  32. 32. A narrower, shorterwaterfall is the goal.
  33. 33. http://flic.kr/p/bMdzZ2Test the squishy.default styles vs. min-width vs. max-width
  34. 34. Performancehttp://timkadlec.com/2013/01/setting-a-performance-budget/http://flic.kr/p/7BBs6eA budget is a guide, not a hard & fast limit.Performance tweaks are compromises.
  35. 35. EXPLAINING THE TIMELINE PANEL
  36. 36. EXPLAINING THE PROFILES PANEL:CSS SELECTORS
  37. 37. EXPLAINING THE PROFILES PANEL:CSS SELECTORS
  38. 38. EXPLAINING THE AUDITS PANEL
  39. 39. PAGESPEED INSIGHTS EXTENSIONhttps://developers.google.com/speed/pagespeed/insights
  40. 40. REMOTE DEBUGGING
  41. 41. Google Analytics Site Speedhttp://www.httpwatch.comIE & FIREFOX PERFORMANCE ISSUES
  42. 42. Google Analytics Site SpeedGOOGLE ANALYTICS’ SITE SPEED
  43. 43. PERFORMANCE TESTING PROXIESMobitestWebPagetest
  44. 44. Google Analytics Site Speedhttp://www.slideshare.net/AndyDavies/web-page-test-beyond-the-basicsWebPagetest - BEYOND THE BASICS
  45. 45. Google Analytics Site SpeedCUSTOMIZING WebPagetest:CAPTURING EVENTS AFTER ONLOAD
  46. 46. CUSTOMIZING WebPagetest:BLACKHOLES FOR REQUESTS
  47. 47. Google Analytics Site SpeedCUSTOMIZING WebPagetest:SCRIPTING & CUSTOM VIEWPORTS
  48. 48. CUSTOMIZING WebPageTest:VIDEO COMPARISON
  49. 49. CUSTOMIZING WebPageTest:VIDEO COMPARISON - SMALL VIEWPORT
  50. 50. mobile bookmarkletTHE ULTIMATE MOBILEPERFORMANCE BOOKMARKLET
  51. 51. charlesproxy.comSLOWING THINGS DOWNThrottleCharles
  52. 52. USING CHARLES PROXYhttp://blog.cloudfour.com/using-charles-proxy-to-examine-ios-apps/
  53. 53. TEST & OPTIMIZE JAVASCRIPT WITH JSPERFhttp://jsperf.com
  54. 54. W3C’s NAVIGATION TIMINGhttp://www.w3.org/TR/navigation-timing/http://www.html5rocks.com/en/tutorials/webperformance/basics/
  55. 55. DiagnosticToolsAutomatedTools
  56. 56. mod_pagespeed AUTOMATES A LOThttp://developers.google.com/speed/pagespeed/mod  add_head  combine_css   convert_jpeg_to_progressive   convert_meta_tags   extend_cache   flatten_css_imports   inline_css   inline_import_to_link   inline_javascript   rewrite_css   rewrite_images   rewrite_javascript   rewrite_style_attributes_with_urlDefault Filters
  57. 57. CodeKitCODEKIT: WEB PERF IN YOUR WORKFLOW  Optimize Images  Combine & MinifyFeatureshttp://incident57.com/codekit/
  58. 58. DEVICEShttp://flic.kr/p/cfkZhN
  59. 59. charlesproxy.comEMULATING MOBILE DEVICESEmulatorsBrowserStack
  60. 60. eBayMobileKarma.comCellphone store leftoversOpen device labsGET YOUR HANDS ONREAL DEVICEShttp://flic.kr/p/7972f6
  61. 61. OPENDEVICELAB.COM
  62. 62. Base on:WiFi-capable, AnalyticsRank, OS, ScreenDimensions, & CostSuggested focus:iPod Touch, mid-levelAndroid, high-end Android,a tablet, Blackberry,Windows Phone 7HOW TO DECIDE WHICH TO GETiPod Touch w/ RetinaSamsung Fascinate +Google Nexus One +$537Example:
  63. 63. ADOBE EDGE INSPECT(THE APP FORMERLY KNOWN AS ADOBE SHADOW)
  64. 64. RESS: AN EVOLUTION OFRESPONSIVE DESIGNhttp://slidesha.re/KtByzQ
  65. 65. WEB PERF TWEEPS TO FOLLOW@ilyagrigorik@andydavies@souders @patmeenan@stoyanstefanov@joshuabixby @yoavweiss@scottjehljust a sampling
  66. 66. Doug GapinskiStrategistmStoner@thedougcoSPECIAL THANKS TO...
  67. 67. QUESTIONS?
  68. 68. Dave OlsenProfessional TechnologistWest Virginia University@dmolsenTHANKS FOR LISTENING
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×