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

How we built Housing Go Chrome Dev Summit 2016

Rahul Yadav
November 11, 2016

How we built Housing Go Chrome Dev Summit 2016

Rahul Yadav

November 11, 2016
Tweet

More Decks by Rahul Yadav

Other Decks in Technology

Transcript

  1. 30% faster page load 10% longer average session 40% lower

    bounce rate 38% more conversions tinyurl.com/housingPWA Housing Go
  2. • Assets delivery • First [Meaningful] Paint • First JS

    enabled interaction • Returning user experience
  3. App Shell Model - First Load Nexus 5 - 3G

    (1.6 Mbps/768 Kbps 300 ms RTT) Loading Screen of Purgatory White screen of death Meaningful Content 2.2s 7s
  4. SSR enabled White screen of death Meaningful Content Nexus 5

    - 3G (1.6 Mbps/768 Kbps 300 ms RTT) 2.3s
  5. JS & CSS Sharding Hash: 3385819cba20c36c8271 Version: webpack 2.1.0-beta.25 Time:

    26022ms Asset Size Chunks Chunk Names manifest.js.gz 1.4 kB 25 [emitted] manifest vendor.js.gz 64 kB 21, 25 [emitted] vendor app.js.gz 39.6 kB 22, 25 [emitted] app homeView.js.gz 11.5 kB 2, 25 [emitted] homeView searchView.js.gz 32.1 kB 1, 25 [emitted] searchView filterView.js.gz 14 kB 8, 25 [emitted] filterView notifyView.js.gz 9.21 kB 9, 25 [emitted] notifyView projectsDedicatedView.js.gz 30.5 kB 0, 25 [emitted] projectsDedicatedView resaleDedicatedView.js.gz 23.9 kB 5, 25 [emitted] resaleDedicatedView pushNotificationsView.js.gz 1.81 kB 17, 25 [emitted] pushNotificationsView offlineView.js.gz 1.81 kB 18, 25 [emitted] offlineView app.css.gz 1.37 kB 22, 25 [emitted] app lazyView.css.gz 3.79 kB 23, 25 [emitted] lazyView homeView.css.gz 2.54 kB 2, 25 [emitted] homeView searchView.css.gz 2.89 kB 1, 25 [emitted] searchView filterView.css.gz 1.5 kB 8, 25 [emitted] filterView notifyView.css.gz 1.16 kB 9, 25 [emitted] notifyView pushNotificationsView.css.gz 1.48 kB 17, 25 [emitted] pushNotificationsView resaleDedicatedView.css.gz 4.22 kB 5, 25 [emitted] resaleDedicatedView projectsDedicatedView.css.gz 6.82 kB 0, 25 [emitted] projectsDedicatedView offlineView.css.gz 368 bytes 18, 25 [emitted] offlineView
  6. <Route name="search" path="search" getComponent={(location, cb) => { require.ensure([], (require) =>

    { require('views/searchView') requireStyle("searchView").then(() => { cb(null, require("views/searchView").default) loadView("detailsView") }) }, "searchView") }} />
  7. First [Meaningful] Paint JS enabled interaction Nexus 5 - 3G

    (1.6 Mbps/768 Kbps 300 ms RTT) 2.3 s 4.2 s
  8. Pre-cache using Service Workers importScripts('sw-toolbox.js') // pre caching const resources

    = ['filterView.js','detailsView.js','searchView.js'] toolbox.precache(resources) // runtime caching toolbox.router.get('(.*).js', toolbox.cacheFirst, { origin: /.housingcdn.com/, mode: 'cors', cache: { name: 'js-assets', maxEntries: 20 } })
  9. First Visit First meaningful paint : 712 ms JS enabled

    interaction : 1.1 s First meaningful paint : 2.2s JS enabled interaction : 4.2 s Repeated Visit Nexus 5 - 3G (1.6 Mbps/768 Kbps 300 ms RTT)