Umbraco and the
Need for Speed
uWestFest 2016 – San Diego, CA
Slide 2
Slide 2 text
Matt Shull
Director of Labs
Aristotle Interactive
aristotle.net
aristotleinteractive.com
mattshull.com
@themattshull
[email protected]
Slide 3
Slide 3 text
mattshull.com/umbraco
Slide 4
Slide 4 text
Why Performance Matters
First and foremost, we believe that
speed is more than a feature. Speed
is the most important feature.
-Fred Wilson
Slide 5
Slide 5 text
Why Performance Matters
Slide 6
Slide 6 text
Why Performance Matters
Slide 7
Slide 7 text
Why Performance Matters
Up to 40% of users will abandon a
request and possibly never return, if
it doesn’t load within 3 seconds.
-Gomez
http://www.mcrinc.com/Documents/Newsletters/201110_why_web_performance_matters.pdf
Slide 8
Slide 8 text
No content
Slide 9
Slide 9 text
Why Performance Matters
Walmart saw up to a 2% increase in
conversions for every 1 second of
improvement in load time. Every
100ms improvement also resulted in
up to a 1% increase in revenue.
https://wpostats.com/2015/11/04/walmart-revenue.html
Slide 10
Slide 10 text
Why Performance Matters
The Aberdeen Group discovered a 1-
second delay resulted in 11% fewer
page views, a 16% decrease in
customer satisfaction, and 7% loss in
conversions.
https://wpostats.com/2015/10/29/aberdeen-1-percent.html
Slide 11
Slide 11 text
Why Performance Matters
Mozilla cut load time by 2.2 seconds
and saw download conversions
increase by 15.4%
https://wpostats.com/2015/10/29/mozilla-2point2.html
Slide 12
Slide 12 text
Total Load Time
Slide 13
Slide 13 text
Time to First Byte
TTFB measures the duration from
the user or client making an HTTP
request to the first byte of the page
being received by the client's
browser.
Slide 14
Slide 14 text
No content
Slide 15
Slide 15 text
No content
Slide 16
Slide 16 text
No content
Slide 17
Slide 17 text
Time to First Byte
• Rendering of server side code
– API calls
– Slow SQL queries
• Connection to the server
– Memory leaks
– Poor server resources
Slide 18
Slide 18 text
Speed Index
Speed Index is the average time at
which visible parts of the page are
displayed. It is expressed in
milliseconds and dependent on size
of the view port.
Slide 19
Slide 19 text
Page Size
Page size measures the number of
kilobytes the site downloads to the
user’s device.
CSS
• Minify files
• Split into 3 files
– Above the fold main page
– Below the fold main page
– Interior
• Use LoadCSS to load in below the fold css
– Use as a fallback
Fonts
• Reduce font weights
• Strip out characters not needed using Font Squirrel
• Use default fonts if possible
Slide 34
Slide 34 text
Fonts
• Font loading event built into browsers soon
• Use current tools for best browser support
– Font face observer
– Google Web Font Loader
– LoadCSS
• Decide whether you want FOIT (Flash of Invisible
Text) or FOUT (Flash of Unstyled Text)
Browser Hints: Prefetch
• Download and cache specific files once the browser is
idle.
Slide 42
Slide 42 text
Browser Hints: Prerender
• Download and cache an entire page
Slide 43
Slide 43 text
https://www.youtube.com/watch?v=_Jn93FDx9oI
Slide 44
Slide 44 text
Measuring
Performance
Slide 45
Slide 45 text
Measuring Performance
• RUM
– Real User Data
– Measured using browser APIs
• Synthetic
– Simulated User Testing
– Simulated using real devices and browsers
Slide 46
Slide 46 text
Median vs Average
Slide 47
Slide 47 text
Measuring Performance: RUM
• Navigation Timing API
• Resource Timing API
• User Timing API
Slide 48
Slide 48 text
No content
Slide 49
Slide 49 text
Navigation Timing API
• Backend Time = responseEnd – requestStart
• Time to First Byte = responseStart – connectEnd
• Frontend Time = now – domLoading
• Total Time = now – navigationStart
Slide 50
Slide 50 text
Navigation Timing API
Slide 51
Slide 51 text
Resource Timing API
• Measure the performance of each resource being
downloaded by the user.
• TTFB = responseStart – startTime
• DNS Lookup = domainLookupEnd – domain
LookupStart
• TCP = connectEnd – connectStart
Slide 52
Slide 52 text
Resource Timing API
Slide 53
Slide 53 text
User Timing API
• Measure performance of web applications with high
precision timing.
• mark()
• measure()
Slide 54
Slide 54 text
User Timing API
window.performance.mark(‘start_req’);
$.get(‘./example.json’,
funcNon(data)
{
//do
something
with
data
window.performance.mark(‘end_req’);
window.performance.measure(‘measure_req’,
‘start_req’,
‘end_req’);
});
Slide 55
Slide 55 text
User Timing API
window.performance.getEntriesByName(‘start_req’);
window.performance.getEntriesByName(‘end_req’);
window.performance.getEntriesByName(‘measure_req’);
Beware of False Performance Prophets
• Google AMP
• Facebook Instant Articles
• Apple News
Slide 59
Slide 59 text
Creating a Culture of Performance
• Has to come from the top down
– Show the impact performance has on business
– Use video to show you vs competitor
• Create a Performance Budget / Specification
• Recognize developers and designers great work
What’s Next?
• Javascript API for detecting connection speed
• Measuring speed index in RUM
• Changes to stylesheets
Slide 63
Slide 63 text
We’re Just Scratching the Surface
• Designing for Performance by Lara Hogan
• Follow Tammy Everts on Twitter and Blog
• Follow Steve Souders Twitter and Blog
• More resources at mattshull.com/umbraco