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
How to make your boss speed-curious and other w...
Search
Peter Hedenskog
September 04, 2014
Technology
0
170
How to make your boss speed-curious and other webperf tricks - coldfront2014
My presentation from ColdFront2014:
http://coldfrontconf.com/
Peter Hedenskog
September 04, 2014
Tweet
Share
More Decks by Peter Hedenskog
See All by Peter Hedenskog
Keeping Wikipedia fast [WeLoveSpeed]
soulislove
1
430
Measuring Web Performance for Wikipedia using synthetic testing tools
soulislove
0
370
Measuring Web Performance Using Selenium
soulislove
2
720
Monitoring Web Performance using Open Source tools (Stockholm)
soulislove
2
220
Monitoring web performance using Open Source tools (San Francisco & Silicon Valley Web Performance Group)
soulislove
1
330
Monitoring web performance using Open Source tools (South Bay JavaScript Meetup)
soulislove
0
230
Optimise your home page (fast as lightning)
soulislove
1
44
Integrating performance tools into continuous delivery
soulislove
0
230
Sitespeed.io Lightning demo @ Velocity Santa Clara 2014
soulislove
0
110
Other Decks in Technology
See All in Technology
AWS re:Inventを徹底的に楽しむためのTips / Tips for thoroughly enjoying AWS re:Invent
yuj1osm
1
650
プロポーザルのつくり方 〜個人技編〜 / How to come up with proposals
ohbarye
4
270
DatabricksにおけるLLMOpsのベストプラクティス
taka_aki
4
1.3k
ZOZOTOWNでの推薦システム活用事例の紹介
f6wbl6
0
210
独自ツール開発でスタジオ撮影をDX!「VLS(Virtual LED Studio)」 / dx-studio-vls
cyberagentdevelopers
PRO
1
200
株式会社ドクターズプライム 会社紹介資料 - エンジニア向け
drsprime
0
160
Postmanの日本市場におけるDevRel (的) 活動 / Postman's DevRelish activities in Japan
yokawasa
1
110
10分でわかるfreee エンジニア向け会社説明資料
freee
18
520k
事業者間調整の行間を読む 調整の具体事例
sugiim
0
2k
いまならこう作りたい AWSコンテナ[本格]入門ハンズオン 〜2024年版 ハンズオンの構想〜
horsewin
10
2.2k
Product Engineer Night #6プロダクトエンジニアを育む仕組み・施策
hacomono
PRO
1
510
AWS CDKでデータリストアの運用、どのように設計する?~Aurora・EFSの実践事例を紹介~/aws-cdk-data-restore-aurora-efs
mhrtech
4
720
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
95
5.2k
Unsuck your backbone
ammeep
668
57k
Ruby is Unlike a Banana
tanoku
96
11k
StorybookのUI Testing Handbookを読んだ
zakiyama
26
5.2k
Building Applications with DynamoDB
mza
90
6.1k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Embracing the Ebb and Flow
colly
84
4.4k
Writing Fast Ruby
sferik
626
61k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
231
17k
4 Signs Your Business is Dying
shpigford
180
21k
Imperfection Machines: The Place of Print at Facebook
scottboms
264
13k
Transcript
How to make your boss speed-curious and other #webperf tricks
Peter Hedenskog
None
None
The Performance Golden Rule!
80-90% of the end-user response time is spent on the
frontend.
front end dev
front end dev
front end dev
front end dev
front end dev
front end dev
With great power …
comes great responsibility!
2
How to be really fast
The boss
World fastest web page
None
Start render: 0,2 s Visually Complete: 0,2 s
What can we learn?
What CDN are you using?
We know the Golden rule!
The rendering path
1. Download HTML
2. If CSS files then download
3. If JS files then download
4. DOM + CSSOM = render tree
5. Paint
Optimize the rendering path
“I like thinking big.” Donald Trump
“Think small” Peter Hedenskog
What?
super computers
super fast internet
remember
mobile phones
data
the city
magic number
14:ish kb
High Performance Browser Networking - Ilya Grigorik Paul Irish
focus
above the fold
“Think small” Peter Hedenskog
Overall
minimize
combine
avoid requests
no requests
HTML
DOM node depth
CSS
inline
<head> ... <style> body { background: #fff; } ... </style>
</head> <body>
https://github.com/filamentgroup/loadCSS
None
NEVER
Avoid reflow and repaint
None
Javascript
JAVASCRIPT CAN BE EVIL
JAVASCRIPT IS EVIL* *inside your rendering path
Synchronously loaded Javascript blocks the rendering path!
Example of non working
NEVER
use async <script src=“/js/calculate.js” async></script> https://www.igvita.com/2014/05/20/script-injected-async-scripts-considered-harmful/
measure above the fold
User Timing API
window.performance. mark(‘logoLoaded’);
window.performance. measure(‘logoTiming’, ‘navigationStart’, ‘logoLoaded’);
var items = window.performance .getEntriesByType(' measure');
None
There’s a polyfill for that!
https://gist.github.com/pmeenan/5902672
Demo
front end dev
The boss
2 kinds
money
http:// www.peterhedenskog.com/ blog/2014/09/more-speed- more-money/
end user Be kind to your users! Mother Theresa
< 0.1 second - instant < 1.0 second - flow
=>10 seconds - lost ! Robert B. Miller - Response Time in Man-Computer Conversational Transactions (1968) The brain
Visualize
Your boss understands red, yellow and green
1200 ms
red 1200 ms
yellow 1200 ms
green 1200 ms
None
x
we are 12% slower than …
None
summary
front end dev
None
small
None
•Peter in Denmark - Lars Von Trier •Donald Trump -
Gage Skidmore •Super computer - Zdjęcia Arkadiusz Sikorski •Monkey with iphone - Marsel Van Oosten •The house - Bert Kaufmann •Stop light peppers - Dennis S Hurd •What is this? - Jeff Carson •Corcovado jesus - Doug88888 •Developers - Austin Wordpress Camp •The evil king - HBO •Pippi Longstocking - Ingrid Vang Nyman •Montgomery Burns - Matt Groening •The dog - Emiliano •Paint over - franziska •Super heroes - Marvel •Vee - Netflix Image credits
Thank you! Peter Hedenskog
[email protected]
@soulislove