Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Building for performance and resilience
Search
Andy Hume
June 17, 2014
Technology
5
1.1k
Building for performance and resilience
Andy Hume
June 17, 2014
Tweet
Share
More Decks by Andy Hume
See All by Andy Hume
Architecting resilient front-ends, jQuery UK, 2015
andyhume
2
1.1k
Architecting resilient front ends
andyhume
3
810
Guardian Responsive Design, SmashingConf 2013
andyhume
6
620
Web Fonts as a Progressive Enhancement, Ampersand 2013
andyhume
2
740
Anatomy of a responsive page load, WhiskyWeb 2013
andyhume
10
1.8k
Breaking News & Breaking Software, SyncConf 2013
andyhume
0
250
Anatomy of a responsive page load, Responsive Day Out 2013
andyhume
23
3.3k
Responsive Guardian
andyhume
21
1k
CSS for grown ups: maturing best practises, SXSW 2012
andyhume
101
47k
Other Decks in Technology
See All in Technology
データパイプラインをなんとかした話 / Improving the Data Pipeline in IVRy
mirakui
1
320
PR TIMESにおけるNext.jsとcacheの付き合い方
apple_yagi
3
360
NilAway による静的解析で「10 億ドル」を節約する #kyotogo / Kyoto Go 56th
ytaka23
3
330
フロントエンド設計にモブ設計を導入してみた / 20241212_cloudsign_TechFrontMeetup
bengo4com
0
1.9k
Amazon Bedrock Knowledge BasesがGraphRAGに対応!! ・・・それってつまりどういうコト!? をチョット深堀ってみる
tokushun
0
200
サーバレスアプリ開発者向けアップデートをキャッチアップしてきた #AWSreInvent #regrowth_fuk
drumnistnakano
0
180
AIのコンプラは何故しんどい?
shujisado
1
170
密着! Bedrockerがre:Invent 2024で過ごした5日間を紹介
minorun365
PRO
3
390
ジャンプTOONにおける サイトマップの自動生成手法
assa1605
0
110
プロダクト開発を加速させるためのQA文化の築き方 / How to build QA culture to accelerate product development
mii3king
1
220
ブラックフライデーで購入したPixel9で、Gemini Nanoを動かしてみた
marchin1989
1
380
Ruby on Railsで作る銘柄スクリーニング
shoe116
0
120
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.5k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.8k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Done Done
chrislema
181
16k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
1
150
Git: the NoSQL Database
bkeepers
PRO
427
64k
GitHub's CSS Performance
jonrohan
1030
460k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
48
2.2k
How To Stay Up To Date on Web Technology
chriscoyier
789
250k
Why Our Code Smells
bkeepers
PRO
335
57k
How to Ace a Technical Interview
jacobian
276
23k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.6k
Transcript
BUILDING FOR @andyhume SmashingConf, New York, 2014 PERFORMANCE RESILIENCE Tuesday,
June 17, 14
WHY CARE? http://www.strangeloopnetworks.com/resources/infographics/web-performance-and-ecommerce/ Tuesday, June 17, 14
WHY CARE? http://www.strangeloopnetworks.com/resources/infographics/web-performance-and-ecommerce/ Tuesday, June 17, 14
WHY CARE? http://www.strangeloopnetworks.com/resources/infographics/web-performance-and-ecommerce/ Tuesday, June 17, 14
WHY CARE? http://www.strangeloopnetworks.com/resources/infographics/web-performance-and-ecommerce/ Tuesday, June 17, 14
WHY CARE? http://www.strangeloopnetworks.com/resources/infographics/web-performance-and-ecommerce/ Tuesday, June 17, 14
WHY CARE? http://www.strangeloopnetworks.com/resources/infographics/web-performance-and-ecommerce/ Tuesday, June 17, 14
Measure http://www.flickr.com/photos/kayaker1204/4319542459/ Tuesday, June 17, 14
Measure http://www.flickr.com/photos/kayaker1204/4319542459/ We have a median page load me of
seven seconds, and our primary compe tor has a median page load me of three seconds. Tell a story Tuesday, June 17, 14
Measure http://www.flickr.com/photos/kayaker1204/4319542459/ Page load mes increased by 25% when we
added feature x. Tell a story Tuesday, June 17, 14
Your bosses love a story http://www.flickr.com/photos/kayaker1204/4319542459/ Tuesday, June 17, 14
Spread the word http://www.flickr.com/photos/kayaker1204/4319542459/ Tuesday, June 17, 14
What numbers?! http://www.flickr.com/photos/kayaker1204/4319542459/ Tuesday, June 17, 14
What numbers?! http://www.flickr.com/photos/kayaker1204/4319542459/ Page load time? Total download size? Start
render time? Time to first byte? Response time? Total HTTP requests? Document load time? Tuesday, June 17, 14
Tuesday, June 17, 14
Tuesday, June 17, 14
Tuesday, June 17, 14
Tuesday, June 17, 14
Tuesday, June 17, 14
Tuesday, June 17, 14
Tuesday, June 17, 14
Load Time First Byte Start Render Fully Loaded Speed Index
FIRST VIEW 3.783s 0.128s 0.676s 6.530s 1522 REPEAT VIEW 2.268s 0.486s 0.486s 3.617s 980 Tuesday, June 17, 14
Load Time First Byte Start Render Fully Loaded Speed Index
FIRST VIEW 3.783s 0.128s 0.676s 6.530s 1522 REPEAT VIEW 2.268s 0.486s 0.486s 3.617s 980 Tuesday, June 17, 14
Load Time First Byte Start Render Fully Loaded Speed Index
FIRST VIEW 3.783s 0.128s 0.676s 6.530s 1522 REPEAT VIEW 2.268s 0.486s 0.486s 3.617s 980 Tuesday, June 17, 14
Measure and tracking trends http://www.flickr.com/photos/kayaker1204/4319542459/ Tuesday, June 17, 14
SpeedCurve http://speedcurve.com Tuesday, June 17, 14
SpeedCurve http://speedcurve.com Tuesday, June 17, 14
How to optimize http://www.flickr.com/photos/freefoto/2231356418/ Tuesday, June 17, 14
Web performance 101 http://www.flickr.com/photos/freefoto/2231356418/ Content-Encoding: gzip Cache-Control: max-age=315360000 Tuesday, June
17, 14
Optimizing: First byte http://www.flickr.com/photos/freefoto/2231356418/ Load Time First Byte Start Render
Fully Loaded Speed Index FIRST VIEW 3.783s 0.128s 0.676s 6.530s 1522 REPEAT VIEW 2.268s 0.486s 0.486s 3.617s 980 Tuesday, June 17, 14
Optimizing: First byte DNS lookup TCP connect HTTP request Server
time HTTP resp Tuesday, June 17, 14
Optimizing: First byte DNS lookup TCP connect HTTP request Server
time HTTP resp Tuesday, June 17, 14
Optimizing: First byte DNS lookup TCP connect HTTP request Server
time HTTP resp Tuesday, June 17, 14
Optimizing: First byte DNS lookup TCP connect HTTP request Server
time HTTP resp Tuesday, June 17, 14
Optimizing: First byte DNS lookup TCP connect HTTP request Server
time HTTP resp SSL Handshake Tuesday, June 17, 14
Optimizing: First byte DNS lookup TCP connect HTTP request Server
time HTTP resp HTTP Redirect SSL Handshake Tuesday, June 17, 14
Optimizing: First byte DNS lookup TCP connect HTTP request Server
time HTTP resp HTTP Redirect SSL Handshake Tuesday, June 17, 14
Optimizing: First byte DNS lookup TCP connect HTTP request Server
time HTTP resp HTTP Redirect SSL Handshake Tuesday, June 17, 14
Optimizing: First byte DNS lookup TCP connect HTTP request Server
time HTTP resp HTTP Redirect SSL Handshake Tuesday, June 17, 14
Optimizing: First byte DNS lookup TCP connect HTTP request Server
time HTTP resp HTTP Redirect SSL Handshake Tuesday, June 17, 14
Eliminate redirects Just eleminate redirects Flush the document early? Prefetch
DNS? But really, just eleminate redirects Optimizing: First byte Tuesday, June 17, 14
Optimizing: Start render http://www.flickr.com/photos/freefoto/2231356418/ Load Time First Byte Start Render
Fully Loaded Speed Index FIRST VIEW 3.783s 0.128s 0.676s 6.530s 1522 REPEAT VIEW 2.268s 0.486s 0.486s 3.617s 980 Tuesday, June 17, 14
Optimizing: Start render HTML parser DOM tree Layout Paint Render
tree Tuesday, June 17, 14
Optimizing: Start render HTML parser DOM tree Layout Paint Render
tree Tuesday, June 17, 14
Remote JS Optimizing: Start render HTML parser DOM tree Layout
Paint Render tree Tuesday, June 17, 14
Optimizing: Start render HTML parser DOM tree Layout Paint Render
tree Tuesday, June 17, 14
inline script waiting on remote CSS Optimizing: Start render HTML
parser DOM tree Layout Paint Render tree Tuesday, June 17, 14
Optimizing: Start render HTML parser DOM tree Layout Paint Render
tree Tuesday, June 17, 14
Optimizing: Start render HTML parser DOM tree Layout Paint Render
tree Tuesday, June 17, 14
Optimizing: Start render HTML parser DOM tree Layout Paint Render
tree fetching remote stylesheets Tuesday, June 17, 14
Optimizing: Start render HTML parser DOM tree Layout Paint Render
tree Tuesday, June 17, 14
Optimizing: Start render HTML parser DOM tree Layout Paint Render
tree Tuesday, June 17, 14
Optimizing: Start render HTML parser DOM tree Layout Paint Render
tree Tuesday, June 17, 14
Optimizing: Start render HTML parser DOM tree Layout Paint Render
tree Tuesday, June 17, 14
Avoid blocking scripts Optimizing: Start render Tuesday, June 17, 14
Optimizing: Start render <script> var script = document.createElement('script'); script.src =
"app.js"; document.head.appendChild(script); </script> Tuesday, June 17, 14
Optimizing: Start render <script> var script = document.createElement('script'); script.src =
"app.js"; document.head.appendChild(script); </script> BREAKS THE PRE-PARSER! Tuesday, June 17, 14
Optimizing: Start render HTML parser DOM tree Layout Paint Render
tree HTML pre- parser Tuesday, June 17, 14
Remote JS Optimizing: Start render HTML parser DOM tree Layout
Paint Render tree HTML pre- parser Tuesday, June 17, 14
Optimizing: Start render HTML parser DOM tree Layout Paint Render
tree HTML pre- parser Tuesday, June 17, 14
Optimizing: Start render HTML parser DOM tree Layout Paint Render
tree HTML pre- parser fetching remote stylesheets Tuesday, June 17, 14
Optimizing: Start render HTML parser DOM tree Layout Paint Render
tree HTML pre- parser Tuesday, June 17, 14
Optimizing: Start render <script> var script = document.createElement('script'); script.src =
"app.js"; document.head.appendChild(script); </script> BREAKS THE PRE-PARSER! Tuesday, June 17, 14
Optimizing: Start render <script src="app.js" async defer></script> Tuesday, June 17,
14
Avoid blocking scripts Optimizing: Start render Move script elements to
end of <body> Or... add async attribute to script elements Inline critical CSS Tuesday, June 17, 14
Avoid blocking scripts Optimizing: Start render Move script elements to
end of <body> Or... add async attribute to script elements Inline critical CSS https://github.com/pocketjoso/penthouse Tuesday, June 17, 14
Optimizing: Load time fully loaded http://www.flickr.com/photos/freefoto/2231356418/ Load Time First Byte
Start Render Fully Loaded Speed Index FIRST VIEW 3.783s 0.128s 0.676s 6.530s 1522 REPEAT VIEW 2.268s 0.486s 0.486s 3.617s 980 Tuesday, June 17, 14
gzip compression (of course!) Far-future caching (of course!) Concatenate files
(of course!) Optimizing: Load time fully loaded Tuesday, June 17, 14
Optimizing: Speed Index http://www.flickr.com/photos/freefoto/2231356418/ Load Time First Byte Start Render
Fully Loaded Speed Index FIRST VIEW 3.783s 0.128s 0.676s 6.530s 1522 REPEAT VIEW 2.268s 0.486s 0.486s 3.617s 980 Tuesday, June 17, 14
http://www.flickr.com/photos/vpickering/6824364286/ Resilience Tuesday, June 17, 14
http://www.flickr.com/photos/the_jorr/325224175/ Unreliable Tuesday, June 17, 14
http://www.flickr.com/photos/8040811@N06/3167877765 Progressive enhancement th Tuesday, June 17, 14
The future http://www.flickr.com/photos/kayaker1204/4319542459/ Tuesday, June 17, 14
Future: HTTP/2 SPDY Tuesday, June 17, 14
Future: HTTP/2 SPDY Multiplexing Cache pushing Tuesday, June 17, 14
Future: ServiceWorker Tuesday, June 17, 14
Future: ServiceWorker this.addEventListener('fetch', function (e) { if (e.request.url.host === 'guardian.co.uk')
{ e.forwardTo('http://theguardian.com'); } } (Possibly not possible) Tuesday, June 17, 14
Future: ServiceWorker this.addEventListener('fetch', function (e) { if (window.innerWidth > 500)
{ e.forwardTo(e.request.url + '?width=large'); } } (Possibly not possible) Tuesday, June 17, 14
Experiment and measure http://www.flickr.com/photos/kayaker1204/4319542459/ Tuesday, June 17, 14
Experiment and measure http://www.flickr.com/photos/kayaker1204/4319542459/ Theorize Experiment, and... Measure Tuesday, June
17, 14
Thank-you! http://lanyrd.com/sdbmhb @andyhume Creative Commons Licensed Attribution, Non-Commercial, Share Alike
cc Tuesday, June 17, 14