José M. Pérez
Solutions Engineer at Facebook
FINDING WEB PERFORMANCE ISSUES YOU DIDN'T KNOW YOU HAD
@jmperezperez
FINDING WEB PERFORMANCE ISSUES YOU DIDN'T KNOW YOU HAD
@jmperezperez
Source: Google Data, Global, n=3,700 aggregated, anonymized Google Analytics data from a sample of mWeb sites opted into sharing benchmark data, March 2016.
%
FINDING WEB PERFORMANCE ISSUES YOU DIDN'T KNOW YOU HAD
@jmperezperez
Source: Speed Matters - Desining for Mobile Performance, Awwwards
FINDING WEB PERFORMANCE ISSUES YOU DIDN'T KNOW YOU HAD
@jmperezperez
FINDING WEB PERFORMANCE ISSUES YOU DIDN'T KNOW YOU HAD
@jmperezperez
FINDING WEB PERFORMANCE ISSUES YOU DIDN'T KNOW YOU HAD
@jmperezperez
FINDING WEB PERFORMANCE ISSUES YOU DIDN'T KNOW YOU HAD
@jmperezperez
FINDING WEB PERFORMANCE ISSUES YOU DIDN'T KNOW YOU HAD
@jmperezperez
FINDING WEB PERFORMANCE ISSUES YOU DIDN'T KNOW YOU HAD
@jmperezperez
FINDING WEB PERFORMANCE ISSUES YOU DIDN'T KNOW YOU HAD
@jmperezperez
Quick & easy
performance fixes
Too much effort for
little gain
FINDING WEB PERFORMANCE ISSUES YOU DIDN'T KNOW YOU HAD
@jmperezperez
36
FINDING WEB PERFORMANCE ISSUES YOU DIDN'T KNOW YOU HAD
@jmperezperez
of potential files are not compressed
%
Source: HTTP Archive
Compression
FINDING WEB PERFORMANCE ISSUES YOU DIDN'T KNOW YOU HAD
@jmperezperez
Preconnect
<link rel="preconnect"
href="https://fonts.gstatic.com/"
crossorigin>
Without Preconnect
With Preconnect
&
FINDING WEB PERFORMANCE ISSUES YOU DIDN'T KNOW YOU HAD
@jmperezperez
Lazy-Loading
FINDING WEB PERFORMANCE ISSUES YOU DIDN'T KNOW YOU HAD
@jmperezperez
Lazy-Loading
// load image when it's within 100px of the viewport
const options = {
rootMargin: '100px'
}
const callback = entries => {
entries.forEach(entry => {
if (entry.intersectionRatio > 0) {
// load image
}
});
};
const observer = new IntersectionObserver(callback, options);
observer.observe(document.querySelector('.lazy-img'));
FINDING WEB PERFORMANCE ISSUES YOU DIDN'T KNOW YOU HAD
@jmperezperez
Lazy-Loading
FINDING WEB PERFORMANCE ISSUES YOU DIDN'T KNOW YOU HAD
@jmperezperez
Lazy-Loading
FINDING WEB PERFORMANCE ISSUES YOU DIDN'T KNOW YOU HAD
@jmperezperez
Lazy-Loading
FINDING WEB PERFORMANCE ISSUES YOU DIDN'T KNOW YOU HAD
@jmperezperez
Font-display
Source: @zachleat
FINDING WEB PERFORMANCE ISSUES YOU DIDN'T KNOW YOU HAD
@jmperezperez
Font-display
Source: @zachleat
FINDING WEB PERFORMANCE ISSUES YOU DIDN'T KNOW YOU HAD
@jmperezperez
Font-display
Source: @zachleat
FINDING WEB PERFORMANCE ISSUES YOU DIDN'T KNOW YOU HAD
@jmperezperez
Font-display
Source: @zachleat
FINDING WEB PERFORMANCE ISSUES YOU DIDN'T KNOW YOU HAD
@jmperezperez
Font-display
FINDING WEB PERFORMANCE ISSUES YOU DIDN'T KNOW YOU HAD
@jmperezperez
FINDING WEB PERFORMANCE ISSUES YOU DIDN'T KNOW YOU HAD
@jmperezperez
Long frames
FINDING WEB PERFORMANCE ISSUES YOU DIDN'T KNOW YOU HAD
@jmperezperez
Unnecessary repaints
FINDING WEB PERFORMANCE ISSUES YOU DIDN'T KNOW YOU HAD
@jmperezperez
Duplicated resources
FINDING WEB PERFORMANCE ISSUES YOU DIDN'T KNOW YOU HAD
@jmperezperez
Tech
Marketing
3rd party scripts impact
FINDING WEB PERFORMANCE ISSUES YOU DIDN'T KNOW YOU HAD
@jmperezperez
Tech
Marketing
Where the magic happens
3rd party scripts impact
FINDING WEB PERFORMANCE ISSUES YOU DIDN'T KNOW YOU HAD
@jmperezperez
3rd party scripts impact
FINDING WEB PERFORMANCE ISSUES YOU DIDN'T KNOW YOU HAD
@jmperezperez
Measure the impact
of your
performance improvements
FINDING WEB PERFORMANCE ISSUES YOU DIDN'T KNOW YOU HAD
@jmperezperez
Monitor your performance
to avoid regressions
BETTER PERFORMANCE FOR COMPONENT-BASED WEB APPS
@jmperezperez
BETTER PERFORMANCE FOR COMPONENT-BASED WEB APPS
@jmperezperez
By José M. Pérez
A quick look at some of the main web performance culprits. Fixing the easy ones and progressing to tackle the difficult to spot ones.