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

Beyond the bubble

Ben Schwarz
September 08, 2017
650

Beyond the bubble

Ben Schwarz

September 08, 2017
Tweet

Transcript

  1. <!doctype html> …
 <link href=“main.css" rel=“stylesheet” /> …
 <img src=“hero-header.jpg”

    /> …
 <script src=“common-vendor.js”> </script> <script src=“app.js” async> </script> ✅ HTML ✅ main.css ✅ webfont.woff2 ✅ hero-header.jpg ✅ webfont-semibold.woff2 ✅ common-vendor.js ✅ app.js
  2. 108 million 65% of the 1.2 Billion population no access

    to the internet. new first time internet users in 2016.
  3. Number of hours worked for 500mb of data $ Brazil

    13 h % Indonesia 6 h & India 4 h ' Germany 1 h
  4. 1hr of work for: • 8 songs on Spotify •

    6 minutes of Youtube • Less than 1 hour playing online games
  5. Average ‘LTE’ speed ( Denmark 30.6 Mbps ' Germany 20.3

    Mbps $ Brazil 19.68 Mbps ) Sweden 15.2 Mbps % Indonesia 8.79 Mbps & India 6.39 Mbps
  6. OPPO Huawei vivo Apple Xaiomi China Samsung ¯\(°_o)/¯ Xaiomi Micromax

    Lenovo India Samsung Apple Huawei Sony Ericsson LG Germany
  7. Vendor Number of units Samsung 78.6 Million Apple 51.9 Million

    Huawei 34.1 Million Oppo 30.9 Million Vivo 25.8 Million Others 158.3 Million Total 379.9 Million Global smartphone sales Q1 2017
  8. Moto G4 Quad-core CPU 2GB Ram 16 or 32Gb of

    storage 1080x1920 13MP Camera
  9. Two versions of the internet The one we use daily

    Cable Fibre Large corporates University Airplanes
 AirBnBs
 Coffee shop wifi
 Conference wifi Lie-fi The one we don’t
  10. We must feel what our customers are feeling, train ourselves

    how to diagnose common performance issues then fix them.
  11. As an industry we need to stop putting our desires

    and needs in front of the people we say we’re building for.
  12. A critical request is one that contains an asset that

    is essential to the content within the user’s viewport.
  13. Fonts load when: • The stylesheet targets an element with

    a font declaration • The stylesheet has a corresponding @font-face declaration • Fonts are not requested until there is text to render
  14. ✅ Use <link rel=“preload” /> ✅ Use font-display: swap; ✅

    Have fallbacks that look similar ✅ Use woff2, woff where possible Webfont performance checklist
  15. Half the amount of data Half the number of requests

    1.59Mb vs 3.41Mb 61 Requests vs 115 Requests
  16. ✅ Use code splitting ✅ Serve only what people need

    ✅ Test using ‘Real world’ conditions ✅ Monitor Parse & Compile time JS Runtime checklist
  17. User navigates First Paint Visually Complete Short Javascript task Long

    Javascript task (>50ms) 5 seconds without long tasks Calculating Time to Interactive
  18. Performance monitoring checklist ✅ Use metrics that describe user-experience ✅

    Test using ‘Real world’ conditions ✅ Monitor continuously
  19. Service worker cache PRPL Pattern Code splitting Modern image formats

    HTTP/2 Reducing JS startup time with Prepack, Rollup, etc Use a CDN! Use SVG Set Cache headers