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

FrontIn BH - Web performance in large scale app...

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers. →
Avatar for Felipe Silva Felipe Silva
September 23, 2017

FrontIn BH - Web performance in large scale applications

Avatar for Felipe Silva

Felipe Silva

September 23, 2017

More Decks by Felipe Silva

Other Decks in Technology

Transcript

  1. Per Jakob Nielsen “The 3 Important Limits of Response Time”.

    Impacto direto em “user engagement and revenue”. Pode determinar seu ranking em social media e search. Internet para celular custa caro. Sobretudo em países emergentes ou em desenvolvimento. Why perceived performance matters?
  2. TTI

  3. TCI

  4. FP & FCP via Performance Observer Interface let observer =

    new PerformanceObserver((list) => { let perfEntries = list.getEntries(); for (let i = 0; i < perfEntries.length; i++) { // report back for analytics and monitoring } }); // register observer for long task notifications observer.observe({entryTypes: [“paint]});
  5. FMP – User Timing and Custom metrics performance.mark("hero-start"); //load hero

    <hero /> performance.mark("hero-end"); performance.measure("hero-timing", "hero-start", "hero-end"); //report data to analytics let measures = performance.getEntriesByName("hero-timing"); let measure = measures[0]; sendToAnalytics(measure.duration);
  6. Consistently Interactive via Google Polyfill //Head of your document <script>

    !function(){if('PerformanceLongTaskTiming' in window){var g=window.__tti={e:[]}; g.o=new PerformanceObserver(function(l) {g.e=g.e.concat(l.getEntries())}); g.o.observe({entryTypes:['longtask']})}}(); </script> //import google polyfill https://github.com/GoogleChrome/tti- polyfill import ttiPolyfill from './path/to/tti-polyfill.js'; ttiPolyfill.getFirstConsistentlyInteractive(opts).then((tti) => { // report back for analytics and monitoring
 });
  7. Third parties SOASTA Research 1. 93% long tasks from Ads

    2. 62% from Ads e Social widgets No Times, reduzimos o número de trackers pela metade.
  8. Recap Perceived performance is good for business, tell your boss.

    User-centric metrics Synthetic metric + RUM = <3 Third parties are hard PRPL