Slide 1

Slide 1 text

Understanding Frontend Performance The tools and methods for debugging performance issues

Slide 2

Slide 2 text

Philip Tellis Principal RUM Distiller @ Akamai Author of the OpenSource boomerang RUM library twitter:@bluesmoon ⦿ github:@bluesmoon speakerdeck:@bluesmoon

Slide 3

Slide 3 text

Agenda ● Tools to measure web performance ● Understanding waterfalls ● Understanding browser diagnostic data ● Measuring RUM data ● How do modern web apps complicate things?

Slide 4

Slide 4 text

WebPageTest.org

Slide 5

Slide 5 text

Select these two

Slide 6

Slide 6 text

Select this

Slide 7

Slide 7 text

Select this

Slide 8

Slide 8 text

RequestMap.WebPerf.Tools

Slide 9

Slide 9 text

Google Lighthouse

Slide 10

Slide 10 text

Chrome Network Waterfall

Slide 11

Slide 11 text

mPulse Beacon Waterfall

Slide 12

Slide 12 text

mPulse Aggregate Waterfall

Slide 13

Slide 13 text

boomerang: https://developer.akamai.com/mpulse/whats-in-a-beacon

Slide 14

Slide 14 text

SPAs & AMP complicate measurement!

Slide 15

Slide 15 text

No JavaScript on AMP ● Analytics code cannot run as usual ● Register an amp-analytics tag to collect whitelisted data https://developer.akamai.com/tools/mpulse/amphtml#Introduction ● Alternately, use amp-pixel

Slide 16

Slide 16 text

SPAs Are Different ● Some user actions result in a soft navigation ● No browser event to tell you when a soft navigation ended ● Resource Timing Buffer fills up ● WebPageTest works with scripting Page transitions without a full reload means most APIs don’t have relevant data.

Slide 17

Slide 17 text

Our approach to measuring SPAs ● Look for network activity or DOM mutations that happen soon after a user action ● Keep listening for more activity until we hit a timeout. ● If images or CSS, or other renderable assets were fetched, wait for them to complete https://www.slideshare.net/nicjansma/measuring-the-performance-of-single-page-applications

Slide 18

Slide 18 text

Our approach to measuring SPAs ● Additionally, if the browser supports Resource Timing, we can use values from there to construct navigation time points. ● We need to clear the resource timing buffer after each beacon. This is easier to see with a quick demo https://www.slideshare.net/nicjansma/measuring-the-performance-of-single-page-applications

Slide 19

Slide 19 text

Summary ● There are many tools freely available for developers to study their site’s performance ● Looking at Waterfalls individually and in aggregate gives different insights ● Modern development frameworks require creative ways to study performance Boston Shipyard Artist’s Community

Slide 20

Slide 20 text

References ● WebPageTest.org ● RequestMap ● Lighthouse ● github.com:boomerang ● mPulse Aggregate Waterfall ● What’s in an mPulse beacon ● AMP in mPulse ● AMP does it really make your site faster ● Measuring the performance of Single Page Applications ● Scripting WebPageTest ● https://virtualglobetrotting.com/

Slide 21

Slide 21 text

Thank You!