SlideShare a Scribd company logo
1 of 40
Download to read offline
Performance,
Optimization and
Frontend
Happiness.
Nuria Ruiz

  @   pantojacoder
Disclaimer
Ground Zero
Performance,
Optimization and
Frontend
Happiness.
What is the
goal?
Pages that
load faster.
Pages that
work better.
Architecting
for
Performance.
First Pageload.
First Pageload

Fastest Javascript is
the one you do not
have to execute.
First Pageload

DOMContentLoaded
triggered as soon as
possible.
Download your
JavaScript code
on demand.
Before:
1.5MB of JS
DOMContentLoaded in
5.5 seconds
After:
DOMContentLoaded in
1.9 seconds

   Still High.
Optimizing
your
Markup.
Too many DOM nodes in
a page will (likely) make it
S L O W ..
How many are
too many?
1.000?

 10.000?

20.000?
2471
                2664
document.querySelectorAll('*').length
Node Explosion
Demo
CSS
matters.
CSS affects
  Framerate
  Scrolling
Browser applies CSS
rules from right to
left
Bad
treehead treerow treecell {…}


Bad but better
treehead > treerow > treecell {…}


Best
.treecell-header {…}
CSS3
Handle with care!
Bad
p ~ span{…}

<p>
  <span>This is not red.</span>
  <p>Here is a paragraph.
     <span> ...
       <span> </span>
     </span>
  </p>
  <code>Here is some code.</code>
  <span>And here is a span.</span>
</p>
What style is slow?


Disable style, note
paintimes.
NOT your friends:
 border-radius
 box-shadow
Measuring
Performance.
Telemetry
http://www.chromium.org/developers/telemetry
Where's the
Happiness?
Faster production
environment yields
Faster development
environment
Bonus track!

Web workers
Flushing
Prefetching
Questions?

More Related Content

What's hot

Deploying Rails on EC2 using Rubber (Slides Only)
Deploying Rails on EC2 using Rubber (Slides Only)Deploying Rails on EC2 using Rubber (Slides Only)
Deploying Rails on EC2 using Rubber (Slides Only)wr0ngway
 
Usersnap and the javascript magic behind the scenes - ViennaJS
Usersnap and the javascript magic behind the scenes - ViennaJSUsersnap and the javascript magic behind the scenes - ViennaJS
Usersnap and the javascript magic behind the scenes - ViennaJSUsersnap
 
MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013Valeri Karpov
 
Introduction to mean stack
Introduction to mean stackIntroduction to mean stack
Introduction to mean stackPraveen Gubbala
 
Web workers and service workers
Web workers and service workersWeb workers and service workers
Web workers and service workersNitish Phanse
 
PHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web DevelopmentPHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web DevelopmentIrfan Maulana
 
Get MEAN! Node.js and the MEAN stack
Get MEAN!  Node.js and the MEAN stackGet MEAN!  Node.js and the MEAN stack
Get MEAN! Node.js and the MEAN stackNicholas McClay
 
13 steps to a faster jekyll website
13 steps to a faster jekyll website13 steps to a faster jekyll website
13 steps to a faster jekyll websiteRonan Berder
 
13 steps to a faster jekyll website
13 steps to a faster jekyll website13 steps to a faster jekyll website
13 steps to a faster jekyll websiteRonan Berder
 
How i acheived a pretty good google page speed insights score
How i acheived a pretty good google page speed insights scoreHow i acheived a pretty good google page speed insights score
How i acheived a pretty good google page speed insights scoreMatt Bailey
 
Angular – Say Goodbye to Javascript Soup
Angular – Say Goodbye to Javascript SoupAngular – Say Goodbye to Javascript Soup
Angular – Say Goodbye to Javascript SoupGraeme Foster
 
[Back2 basic] from c10k problem to concurrency concept
[Back2 basic] from c10k problem to concurrency concept[Back2 basic] from c10k problem to concurrency concept
[Back2 basic] from c10k problem to concurrency conceptTrịnh Thế Thành
 
Martin Splitt "A short history of the web"
Martin Splitt "A short history of the web"Martin Splitt "A short history of the web"
Martin Splitt "A short history of the web"Fwdays
 
Bigger Stronger Faster
Bigger Stronger FasterBigger Stronger Faster
Bigger Stronger FasterChris Love
 
Front-End Web Performance Optimization by BucketSoft
Front-End Web Performance Optimization by BucketSoftFront-End Web Performance Optimization by BucketSoft
Front-End Web Performance Optimization by BucketSoftSteve Wortham
 
Introduction to the MEAN stack
Introduction to the MEAN stackIntroduction to the MEAN stack
Introduction to the MEAN stackYoann Gotthilf
 
Erlang web framework: Chicago boss
Erlang web framework: Chicago bossErlang web framework: Chicago boss
Erlang web framework: Chicago bossBarcamp Saigon
 
LAMP is so yesterday, MEAN is so tomorrow! :)
LAMP is so yesterday, MEAN is so tomorrow! :) LAMP is so yesterday, MEAN is so tomorrow! :)
LAMP is so yesterday, MEAN is so tomorrow! :) Sascha Sambale
 

What's hot (20)

Deploying Rails on EC2 using Rubber (Slides Only)
Deploying Rails on EC2 using Rubber (Slides Only)Deploying Rails on EC2 using Rubber (Slides Only)
Deploying Rails on EC2 using Rubber (Slides Only)
 
Usersnap and the javascript magic behind the scenes - ViennaJS
Usersnap and the javascript magic behind the scenes - ViennaJSUsersnap and the javascript magic behind the scenes - ViennaJS
Usersnap and the javascript magic behind the scenes - ViennaJS
 
MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013
 
Introduction to mean stack
Introduction to mean stackIntroduction to mean stack
Introduction to mean stack
 
Mean PPT
Mean PPTMean PPT
Mean PPT
 
Web workers and service workers
Web workers and service workersWeb workers and service workers
Web workers and service workers
 
Why NodeJS
Why NodeJSWhy NodeJS
Why NodeJS
 
PHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web DevelopmentPHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web Development
 
Get MEAN! Node.js and the MEAN stack
Get MEAN!  Node.js and the MEAN stackGet MEAN!  Node.js and the MEAN stack
Get MEAN! Node.js and the MEAN stack
 
13 steps to a faster jekyll website
13 steps to a faster jekyll website13 steps to a faster jekyll website
13 steps to a faster jekyll website
 
13 steps to a faster jekyll website
13 steps to a faster jekyll website13 steps to a faster jekyll website
13 steps to a faster jekyll website
 
How i acheived a pretty good google page speed insights score
How i acheived a pretty good google page speed insights scoreHow i acheived a pretty good google page speed insights score
How i acheived a pretty good google page speed insights score
 
Angular – Say Goodbye to Javascript Soup
Angular – Say Goodbye to Javascript SoupAngular – Say Goodbye to Javascript Soup
Angular – Say Goodbye to Javascript Soup
 
[Back2 basic] from c10k problem to concurrency concept
[Back2 basic] from c10k problem to concurrency concept[Back2 basic] from c10k problem to concurrency concept
[Back2 basic] from c10k problem to concurrency concept
 
Martin Splitt "A short history of the web"
Martin Splitt "A short history of the web"Martin Splitt "A short history of the web"
Martin Splitt "A short history of the web"
 
Bigger Stronger Faster
Bigger Stronger FasterBigger Stronger Faster
Bigger Stronger Faster
 
Front-End Web Performance Optimization by BucketSoft
Front-End Web Performance Optimization by BucketSoftFront-End Web Performance Optimization by BucketSoft
Front-End Web Performance Optimization by BucketSoft
 
Introduction to the MEAN stack
Introduction to the MEAN stackIntroduction to the MEAN stack
Introduction to the MEAN stack
 
Erlang web framework: Chicago boss
Erlang web framework: Chicago bossErlang web framework: Chicago boss
Erlang web framework: Chicago boss
 
LAMP is so yesterday, MEAN is so tomorrow! :)
LAMP is so yesterday, MEAN is so tomorrow! :) LAMP is so yesterday, MEAN is so tomorrow! :)
LAMP is so yesterday, MEAN is so tomorrow! :)
 

Similar to Performace optimizations and frontend happiness

Web performance
Web performanceWeb performance
Web performanceSamir Das
 
Building high performing web pages
Building high performing web pagesBuilding high performing web pages
Building high performing web pagesNilesh Bafna
 
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps Faster
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps FasterPractical Performance Tips and Tricks to Make Your HTML/JavaScript Apps Faster
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps FasterDoris Chen
 
Exploring Critical Rendering Path
Exploring Critical Rendering PathExploring Critical Rendering Path
Exploring Critical Rendering PathRaphael Amorim
 
Vlad zelinschi optimizing the critical rendering path
Vlad zelinschi   optimizing the critical rendering pathVlad zelinschi   optimizing the critical rendering path
Vlad zelinschi optimizing the critical rendering pathCodecamp Romania
 
7 tips for javascript rich ajax websites
7 tips for javascript rich ajax websites7 tips for javascript rich ajax websites
7 tips for javascript rich ajax websitesoazabir
 
Frontend Performance: Illusions & browser rendering
Frontend Performance: Illusions & browser renderingFrontend Performance: Illusions & browser rendering
Frontend Performance: Illusions & browser renderingManuel Garcia
 
Developing High Performance Web Apps
Developing High Performance Web AppsDeveloping High Performance Web Apps
Developing High Performance Web AppsTimothy Fisher
 
@media - Even Faster Web Sites
@media - Even Faster Web Sites@media - Even Faster Web Sites
@media - Even Faster Web SitesSteve Souders
 
JavaScript front end performance optimizations
JavaScript front end performance optimizationsJavaScript front end performance optimizations
JavaScript front end performance optimizationsChris Love
 
Debugging perf with devtools
Debugging perf with devtoolsDebugging perf with devtools
Debugging perf with devtoolsPriyanka Kore
 
Building performance into the new yahoo homepage presentation
Building performance into the new yahoo  homepage presentationBuilding performance into the new yahoo  homepage presentation
Building performance into the new yahoo homepage presentationmasudakram
 
Performance on the Yahoo! Homepage
Performance on the Yahoo! HomepagePerformance on the Yahoo! Homepage
Performance on the Yahoo! HomepageNicholas Zakas
 
The latest in site speed: advanced #webperf 2018
The latest in site speed: advanced #webperf 2018The latest in site speed: advanced #webperf 2018
The latest in site speed: advanced #webperf 2018Anton Shulke
 
Optimising Web Application Frontend
Optimising Web Application FrontendOptimising Web Application Frontend
Optimising Web Application Frontendtkramar
 
HK CodeConf 2015 - Your WebPerf Sucks
HK CodeConf 2015 - Your WebPerf Sucks HK CodeConf 2015 - Your WebPerf Sucks
HK CodeConf 2015 - Your WebPerf Sucks Holger Bartel
 

Similar to Performace optimizations and frontend happiness (20)

Web performance
Web performanceWeb performance
Web performance
 
SMX_DevTools_Monaco_2.pdf
SMX_DevTools_Monaco_2.pdfSMX_DevTools_Monaco_2.pdf
SMX_DevTools_Monaco_2.pdf
 
Building high performing web pages
Building high performing web pagesBuilding high performing web pages
Building high performing web pages
 
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps Faster
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps FasterPractical Performance Tips and Tricks to Make Your HTML/JavaScript Apps Faster
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps Faster
 
Exploring Critical Rendering Path
Exploring Critical Rendering PathExploring Critical Rendering Path
Exploring Critical Rendering Path
 
Vlad zelinschi optimizing the critical rendering path
Vlad zelinschi   optimizing the critical rendering pathVlad zelinschi   optimizing the critical rendering path
Vlad zelinschi optimizing the critical rendering path
 
7 tips for javascript rich ajax websites
7 tips for javascript rich ajax websites7 tips for javascript rich ajax websites
7 tips for javascript rich ajax websites
 
Frontend Performance: Illusions & browser rendering
Frontend Performance: Illusions & browser renderingFrontend Performance: Illusions & browser rendering
Frontend Performance: Illusions & browser rendering
 
Responsive Enhancement
Responsive EnhancementResponsive Enhancement
Responsive Enhancement
 
Developing High Performance Web Apps
Developing High Performance Web AppsDeveloping High Performance Web Apps
Developing High Performance Web Apps
 
@media - Even Faster Web Sites
@media - Even Faster Web Sites@media - Even Faster Web Sites
@media - Even Faster Web Sites
 
JavaScript front end performance optimizations
JavaScript front end performance optimizationsJavaScript front end performance optimizations
JavaScript front end performance optimizations
 
Debugging perf with devtools
Debugging perf with devtoolsDebugging perf with devtools
Debugging perf with devtools
 
20120514 nodejsdublin
20120514 nodejsdublin20120514 nodejsdublin
20120514 nodejsdublin
 
Building performance into the new yahoo homepage presentation
Building performance into the new yahoo  homepage presentationBuilding performance into the new yahoo  homepage presentation
Building performance into the new yahoo homepage presentation
 
Performance on the Yahoo! Homepage
Performance on the Yahoo! HomepagePerformance on the Yahoo! Homepage
Performance on the Yahoo! Homepage
 
#Webperf Choreography
#Webperf Choreography#Webperf Choreography
#Webperf Choreography
 
The latest in site speed: advanced #webperf 2018
The latest in site speed: advanced #webperf 2018The latest in site speed: advanced #webperf 2018
The latest in site speed: advanced #webperf 2018
 
Optimising Web Application Frontend
Optimising Web Application FrontendOptimising Web Application Frontend
Optimising Web Application Frontend
 
HK CodeConf 2015 - Your WebPerf Sucks
HK CodeConf 2015 - Your WebPerf Sucks HK CodeConf 2015 - Your WebPerf Sucks
HK CodeConf 2015 - Your WebPerf Sucks
 

More from nuria_ruiz

Wikipedia 101 governance and tech stack
Wikipedia 101  governance and tech stack Wikipedia 101  governance and tech stack
Wikipedia 101 governance and tech stack nuria_ruiz
 
Data and privacy at scale at wikipedia strata
Data and privacy at scale at wikipedia   strataData and privacy at scale at wikipedia   strata
Data and privacy at scale at wikipedia stratanuria_ruiz
 
(Some of) Wikipedia's Open Data
(Some of) Wikipedia's Open Data(Some of) Wikipedia's Open Data
(Some of) Wikipedia's Open Datanuria_ruiz
 
The most popular browser
The most popular browserThe most popular browser
The most popular browsernuria_ruiz
 
The dashboarding problem
The dashboarding problemThe dashboarding problem
The dashboarding problemnuria_ruiz
 
Client Side rendering Not so Easy
Client Side rendering Not so EasyClient Side rendering Not so Easy
Client Side rendering Not so Easynuria_ruiz
 

More from nuria_ruiz (6)

Wikipedia 101 governance and tech stack
Wikipedia 101  governance and tech stack Wikipedia 101  governance and tech stack
Wikipedia 101 governance and tech stack
 
Data and privacy at scale at wikipedia strata
Data and privacy at scale at wikipedia   strataData and privacy at scale at wikipedia   strata
Data and privacy at scale at wikipedia strata
 
(Some of) Wikipedia's Open Data
(Some of) Wikipedia's Open Data(Some of) Wikipedia's Open Data
(Some of) Wikipedia's Open Data
 
The most popular browser
The most popular browserThe most popular browser
The most popular browser
 
The dashboarding problem
The dashboarding problemThe dashboarding problem
The dashboarding problem
 
Client Side rendering Not so Easy
Client Side rendering Not so EasyClient Side rendering Not so Easy
Client Side rendering Not so Easy
 

Performace optimizations and frontend happiness