SlideShare a Scribd company logo
LOADING...
Delivering apps at the speed of light
Average web site constantly growth
7 seconds to load
Is it a lot?
Delay perception
< 100 msec
100-300 msec
300 - 1000 msec
1+ sec
10+ sec
Instant response
Small delay
System works
Switching task
Cancelling operation
Feel happy on desktop
so why to optimize?
Everybody can wait, they said
● 47% expect for page to be loaded in 2 seconds;
● 57% will cancel loading after 3 seconds loading;
● 75% will never visit page which was responding for 4
seconds and more;
● Google recommends to optimize pages in order to have
less than 1 seconds loading time on broadband
connection.
Optimizing loading speed
is a wrong definition
Why?
Minimal Viable eXperience (MVX)
Time to interact (TTI)
1. Amount of network traffic
2. Number of requests
3. Size of Critical Path
4. Rendering minimal UI
How HTTP works?
Because engineer should
know how
HTTP in action
Keep alive
Slow start and congestion control
Decreasing files number
Because of congestion control
Concat JS and CSS
Because it is important
to have less files
Do image sprites
Because it is important
to have less files
Decreasing traffic
Ofcourse we should
It is important to have less traffic
Enable GZIP
-80% to text files
-20% to page size
Set caching
headers
Up to -100%
Expires (how long is active)
Last-Modified
Minify JS
-60%
Minify CSS
-10%
Minify HTML
-5%
Minify images
-10% and progressive JPEGs
Loading order
Because JS and CSS loading
slows your down
CSS locks render
when loading
Insert CSS into header of
the page to prevent waiting
for it when the rest is done
JS locks parsing
when loading
Insert JS into the bottom
of the page to prevent parsing lock
CSS = TOP
JS = BOTTOM
But sometimes we do not need to load
everything for minimal viable experience to
start...
Critical path
First deliver things that
user need first (MVX)
in order to decrease TTI
The return of server
rendering
And the start of isomorphic JavaScript
SPA renders on client
1. Loading HTML/JS/CSS
2. Initializing application logic
3. Loading application data
4. Rendering
SPA renders on server
1. Loading HTML/JS/CSS
2. Rendering
Server rendering is
cool but expensive
Let`s consider inline data delivery
window.MyApp.inlineData = {
//Server generated JSON goes here
};
SPA renders on client, data inlined
1. Loading HTML/JS/CSS
2. Initializing application logic
3. Rendering
Because actually data loading
takes long and inlining JSON is cheap
Two approaches of server rendering
Create HTML with
NodeJS
Create HTML by
rendering client - side
code in headless
browser, PhantomJS
Check list
● Concat JS and CSS
● Use image sprites and progressive JPEGs
● Minify resources
● Place CSS at top and JS at bottom
● Enable caching headers
● Enable GZIP
● Do not use redirects
Check list
● Use CDNs
● Use server rendering or data inlining
● Separate critical path if JS or CSS is larger
than 15 Kb
● Eat less cookies, they are being sent to
server
● Try prefetching and service worker
Nice tool for lazy
people
developers.google.com/speed/pagespeed/insights/
Nice tool for
diving into details
webpagetest.org

More Related Content

What's hot

NServiceBus_for_Admins
NServiceBus_for_AdminsNServiceBus_for_Admins
NServiceBus_for_Admins
Adam Fyles
 
Glimpse of Loops Vs Set
Glimpse of Loops Vs SetGlimpse of Loops Vs Set
Glimpse of Loops Vs Set
Mindfire Solutions
 
High Availability of Azure Applications
High Availability of Azure ApplicationsHigh Availability of Azure Applications
High Availability of Azure Applications
Mindfire Solutions
 
From Web Developer to Hardware Developer
From Web Developer to Hardware DeveloperFrom Web Developer to Hardware Developer
From Web Developer to Hardware Developer
alexshenoy
 
Web Socket
Web SocketWeb Socket
Web Socket
Jack Bui
 
Wp speedy make your word-press website loads faster
Wp speedy   make your word-press website loads fasterWp speedy   make your word-press website loads faster
Wp speedy make your word-press website loads faster
Sasa Bastian Jovanovic
 
Universiti Pendidikan Sultan Idris (UPSI) Sharing Success Story by the Region...
Universiti Pendidikan Sultan Idris (UPSI) Sharing Success Story by the Region...Universiti Pendidikan Sultan Idris (UPSI) Sharing Success Story by the Region...
Universiti Pendidikan Sultan Idris (UPSI) Sharing Success Story by the Region...
Linuxmalaysia Malaysia
 
Ajaxcom
AjaxcomAjaxcom
Ajaxcom
vurimi prasad
 
txt web overview
 txt web overview txt web overview
txt web overview
Narayan Srinivasan
 
Anypoint lessons
Anypoint lessonsAnypoint lessons
Anypoint lessons
Dwight Cavalcanti
 
Simple todo app with meteor
Simple todo app with meteorSimple todo app with meteor
Simple todo app with meteorAlex Long
 
Demo on Mule ESB Facebook Connector
Demo on Mule ESB Facebook ConnectorDemo on Mule ESB Facebook Connector
Demo on Mule ESB Facebook Connector
Rupesh Sinha
 
Web application with mule
Web application with muleWeb application with mule
Web application with mule
Anirban Sen Chowdhary
 
Supporting large scale React applications
Supporting large scale React applicationsSupporting large scale React applications
Supporting large scale React applications
Maurice De Beijer [MVP]
 
Spreadshirt Techcamp 2018 - Hold until Told
Spreadshirt Techcamp 2018 - Hold until ToldSpreadshirt Techcamp 2018 - Hold until Told
Spreadshirt Techcamp 2018 - Hold until Told
Martin Breest
 
Deploying and running mule standalone
Deploying and running mule standaloneDeploying and running mule standalone
Deploying and running mule standalone
mdfkhan625
 
Dmiexpo 16 - Oren Shatz - Page Loading Speed Explained
Dmiexpo   16 - Oren Shatz - Page Loading Speed ExplainedDmiexpo   16 - Oren Shatz - Page Loading Speed Explained
Dmiexpo 16 - Oren Shatz - Page Loading Speed Explained
Morning Dough
 

What's hot (19)

NServiceBus_for_Admins
NServiceBus_for_AdminsNServiceBus_for_Admins
NServiceBus_for_Admins
 
Glimpse of Loops Vs Set
Glimpse of Loops Vs SetGlimpse of Loops Vs Set
Glimpse of Loops Vs Set
 
High Availability of Azure Applications
High Availability of Azure ApplicationsHigh Availability of Azure Applications
High Availability of Azure Applications
 
From Web Developer to Hardware Developer
From Web Developer to Hardware DeveloperFrom Web Developer to Hardware Developer
From Web Developer to Hardware Developer
 
Web Socket
Web SocketWeb Socket
Web Socket
 
Wp speedy make your word-press website loads faster
Wp speedy   make your word-press website loads fasterWp speedy   make your word-press website loads faster
Wp speedy make your word-press website loads faster
 
Spicing your mule response
Spicing your mule responseSpicing your mule response
Spicing your mule response
 
Universiti Pendidikan Sultan Idris (UPSI) Sharing Success Story by the Region...
Universiti Pendidikan Sultan Idris (UPSI) Sharing Success Story by the Region...Universiti Pendidikan Sultan Idris (UPSI) Sharing Success Story by the Region...
Universiti Pendidikan Sultan Idris (UPSI) Sharing Success Story by the Region...
 
Ajax
Ajax Ajax
Ajax
 
Ajaxcom
AjaxcomAjaxcom
Ajaxcom
 
txt web overview
 txt web overview txt web overview
txt web overview
 
Anypoint lessons
Anypoint lessonsAnypoint lessons
Anypoint lessons
 
Simple todo app with meteor
Simple todo app with meteorSimple todo app with meteor
Simple todo app with meteor
 
Demo on Mule ESB Facebook Connector
Demo on Mule ESB Facebook ConnectorDemo on Mule ESB Facebook Connector
Demo on Mule ESB Facebook Connector
 
Web application with mule
Web application with muleWeb application with mule
Web application with mule
 
Supporting large scale React applications
Supporting large scale React applicationsSupporting large scale React applications
Supporting large scale React applications
 
Spreadshirt Techcamp 2018 - Hold until Told
Spreadshirt Techcamp 2018 - Hold until ToldSpreadshirt Techcamp 2018 - Hold until Told
Spreadshirt Techcamp 2018 - Hold until Told
 
Deploying and running mule standalone
Deploying and running mule standaloneDeploying and running mule standalone
Deploying and running mule standalone
 
Dmiexpo 16 - Oren Shatz - Page Loading Speed Explained
Dmiexpo   16 - Oren Shatz - Page Loading Speed ExplainedDmiexpo   16 - Oren Shatz - Page Loading Speed Explained
Dmiexpo 16 - Oren Shatz - Page Loading Speed Explained
 

Similar to 1.Loading

Developing high performance and responsive web apps using web worker
Developing high performance and responsive web apps using web workerDeveloping high performance and responsive web apps using web worker
Developing high performance and responsive web apps using web worker
Suresh Patidar
 
MeasureWorks - Why people hate to wait for your website to load (and how to f...
MeasureWorks - Why people hate to wait for your website to load (and how to f...MeasureWorks - Why people hate to wait for your website to load (and how to f...
MeasureWorks - Why people hate to wait for your website to load (and how to f...
MeasureWorks
 
Lighthouse
LighthouseLighthouse
Lighthouse
Hsin-Hao Tang
 
How NOT to get lost in the current JavaScript landscape
How NOT to get lost in the current JavaScript landscapeHow NOT to get lost in the current JavaScript landscape
How NOT to get lost in the current JavaScript landscape
Radosław Scheibinger
 
Front End Optimization, 'The Cloud' can help you!
Front End Optimization, 'The Cloud' can help you!Front End Optimization, 'The Cloud' can help you!
Front End Optimization, 'The Cloud' can help you!
Marco Vito Moscaritolo
 
Making it fast: Zotonic & Performance
Making it fast: Zotonic & PerformanceMaking it fast: Zotonic & Performance
Making it fast: Zotonic & Performance
Arjan
 
Web Performance, Scalability, and Testing Techniques - Boston PHP Meetup
Web Performance, Scalability, and Testing Techniques - Boston PHP MeetupWeb Performance, Scalability, and Testing Techniques - Boston PHP Meetup
Web Performance, Scalability, and Testing Techniques - Boston PHP Meetup
Jonathan Klein
 
Website Performance
Website PerformanceWebsite Performance
Website PerformanceHugo Fonseca
 
Optimising Web Application Frontend
Optimising Web Application FrontendOptimising Web Application Frontend
Optimising Web Application Frontendtkramar
 
Configuring Apache Servers for Better Web Perormance
Configuring Apache Servers for Better Web PerormanceConfiguring Apache Servers for Better Web Perormance
Configuring Apache Servers for Better Web Perormance
Spark::red
 
Site Speed Fundamentals
Site Speed FundamentalsSite Speed Fundamentals
Site Speed Fundamentals
Martin Breest
 
Application Performance Lecture
Application Performance LectureApplication Performance Lecture
Application Performance LectureVishwanath Ramdas
 
Web Performance Optimization (WPO)
Web Performance Optimization (WPO)Web Performance Optimization (WPO)
Web Performance Optimization (WPO)
Betclic Everest Group Tech Team
 
Performace optimization (increase website speed)
Performace optimization (increase website speed)Performace optimization (increase website speed)
Performace optimization (increase website speed)
clickramanm
 
Presemtation Tier Optimizations
Presemtation Tier OptimizationsPresemtation Tier Optimizations
Presemtation Tier Optimizations
Anup Hariharan Nair
 
Web performance
Web performanceWeb performance
Web performance
Samir Das
 
Magento performancenbs
Magento performancenbsMagento performancenbs
Magento performancenbsvarien
 
Developing High Performance Web Apps
Developing High Performance Web AppsDeveloping High Performance Web Apps
Developing High Performance Web Apps
Timothy Fisher
 
Front end optimization
Front end optimizationFront end optimization
Front end optimizationAbhishek Anand
 
Joomla! Performance on Steroids
Joomla! Performance on SteroidsJoomla! Performance on Steroids
Joomla! Performance on Steroids
SiteGround.com
 

Similar to 1.Loading (20)

Developing high performance and responsive web apps using web worker
Developing high performance and responsive web apps using web workerDeveloping high performance and responsive web apps using web worker
Developing high performance and responsive web apps using web worker
 
MeasureWorks - Why people hate to wait for your website to load (and how to f...
MeasureWorks - Why people hate to wait for your website to load (and how to f...MeasureWorks - Why people hate to wait for your website to load (and how to f...
MeasureWorks - Why people hate to wait for your website to load (and how to f...
 
Lighthouse
LighthouseLighthouse
Lighthouse
 
How NOT to get lost in the current JavaScript landscape
How NOT to get lost in the current JavaScript landscapeHow NOT to get lost in the current JavaScript landscape
How NOT to get lost in the current JavaScript landscape
 
Front End Optimization, 'The Cloud' can help you!
Front End Optimization, 'The Cloud' can help you!Front End Optimization, 'The Cloud' can help you!
Front End Optimization, 'The Cloud' can help you!
 
Making it fast: Zotonic & Performance
Making it fast: Zotonic & PerformanceMaking it fast: Zotonic & Performance
Making it fast: Zotonic & Performance
 
Web Performance, Scalability, and Testing Techniques - Boston PHP Meetup
Web Performance, Scalability, and Testing Techniques - Boston PHP MeetupWeb Performance, Scalability, and Testing Techniques - Boston PHP Meetup
Web Performance, Scalability, and Testing Techniques - Boston PHP Meetup
 
Website Performance
Website PerformanceWebsite Performance
Website Performance
 
Optimising Web Application Frontend
Optimising Web Application FrontendOptimising Web Application Frontend
Optimising Web Application Frontend
 
Configuring Apache Servers for Better Web Perormance
Configuring Apache Servers for Better Web PerormanceConfiguring Apache Servers for Better Web Perormance
Configuring Apache Servers for Better Web Perormance
 
Site Speed Fundamentals
Site Speed FundamentalsSite Speed Fundamentals
Site Speed Fundamentals
 
Application Performance Lecture
Application Performance LectureApplication Performance Lecture
Application Performance Lecture
 
Web Performance Optimization (WPO)
Web Performance Optimization (WPO)Web Performance Optimization (WPO)
Web Performance Optimization (WPO)
 
Performace optimization (increase website speed)
Performace optimization (increase website speed)Performace optimization (increase website speed)
Performace optimization (increase website speed)
 
Presemtation Tier Optimizations
Presemtation Tier OptimizationsPresemtation Tier Optimizations
Presemtation Tier Optimizations
 
Web performance
Web performanceWeb performance
Web performance
 
Magento performancenbs
Magento performancenbsMagento performancenbs
Magento performancenbs
 
Developing High Performance Web Apps
Developing High Performance Web AppsDeveloping High Performance Web Apps
Developing High Performance Web Apps
 
Front end optimization
Front end optimizationFront end optimization
Front end optimization
 
Joomla! Performance on Steroids
Joomla! Performance on SteroidsJoomla! Performance on Steroids
Joomla! Performance on Steroids
 

More from Denis Radin

Mining crypto in browser as a bleeding edge performance challenge for the Web...
Mining crypto in browser as a bleeding edge performance challenge for the Web...Mining crypto in browser as a bleeding edge performance challenge for the Web...
Mining crypto in browser as a bleeding edge performance challenge for the Web...
Denis Radin
 
Pixel shaders based UI components + writing your first pixel shader
Pixel shaders based UI components + writing your first pixel shaderPixel shaders based UI components + writing your first pixel shader
Pixel shaders based UI components + writing your first pixel shader
Denis Radin
 
Migrating your Web app to Virtual Reality
Migrating your Web app to Virtual RealityMigrating your Web app to Virtual Reality
Migrating your Web app to Virtual Reality
Denis Radin
 
Building native apps with web components
Building native apps with web componentsBuilding native apps with web components
Building native apps with web components
Denis Radin
 
Applying NASA coding guidelines to JavaScript or airspace is closer than you ...
Applying NASA coding guidelines to JavaScript or airspace is closer than you ...Applying NASA coding guidelines to JavaScript or airspace is closer than you ...
Applying NASA coding guidelines to JavaScript or airspace is closer than you ...
Denis Radin
 
HTML GL - 60 FPS and amazing effects by rendering HTML/CSS in WebGL, framewor...
HTML GL - 60 FPS and amazing effects by rendering HTML/CSS in WebGL, framewor...HTML GL - 60 FPS and amazing effects by rendering HTML/CSS in WebGL, framewor...
HTML GL - 60 FPS and amazing effects by rendering HTML/CSS in WebGL, framewor...
Denis Radin
 
Front-end tower of Babylon
Front-end tower of BabylonFront-end tower of Babylon
Front-end tower of Babylon
Denis Radin
 
JavaScript and HTML in shipbuilding and aircraft industries
JavaScript and HTML in shipbuilding and aircraft industriesJavaScript and HTML in shipbuilding and aircraft industries
JavaScript and HTML in shipbuilding and aircraft industries
Denis Radin
 
More native look and feel of mobile JS applications with HTML5 canvas
More native look and feel of mobile JS applications with HTML5 canvasMore native look and feel of mobile JS applications with HTML5 canvas
More native look and feel of mobile JS applications with HTML5 canvas
Denis Radin
 
FlAnalyzer
FlAnalyzerFlAnalyzer
FlAnalyzer
Denis Radin
 

More from Denis Radin (10)

Mining crypto in browser as a bleeding edge performance challenge for the Web...
Mining crypto in browser as a bleeding edge performance challenge for the Web...Mining crypto in browser as a bleeding edge performance challenge for the Web...
Mining crypto in browser as a bleeding edge performance challenge for the Web...
 
Pixel shaders based UI components + writing your first pixel shader
Pixel shaders based UI components + writing your first pixel shaderPixel shaders based UI components + writing your first pixel shader
Pixel shaders based UI components + writing your first pixel shader
 
Migrating your Web app to Virtual Reality
Migrating your Web app to Virtual RealityMigrating your Web app to Virtual Reality
Migrating your Web app to Virtual Reality
 
Building native apps with web components
Building native apps with web componentsBuilding native apps with web components
Building native apps with web components
 
Applying NASA coding guidelines to JavaScript or airspace is closer than you ...
Applying NASA coding guidelines to JavaScript or airspace is closer than you ...Applying NASA coding guidelines to JavaScript or airspace is closer than you ...
Applying NASA coding guidelines to JavaScript or airspace is closer than you ...
 
HTML GL - 60 FPS and amazing effects by rendering HTML/CSS in WebGL, framewor...
HTML GL - 60 FPS and amazing effects by rendering HTML/CSS in WebGL, framewor...HTML GL - 60 FPS and amazing effects by rendering HTML/CSS in WebGL, framewor...
HTML GL - 60 FPS and amazing effects by rendering HTML/CSS in WebGL, framewor...
 
Front-end tower of Babylon
Front-end tower of BabylonFront-end tower of Babylon
Front-end tower of Babylon
 
JavaScript and HTML in shipbuilding and aircraft industries
JavaScript and HTML in shipbuilding and aircraft industriesJavaScript and HTML in shipbuilding and aircraft industries
JavaScript and HTML in shipbuilding and aircraft industries
 
More native look and feel of mobile JS applications with HTML5 canvas
More native look and feel of mobile JS applications with HTML5 canvasMore native look and feel of mobile JS applications with HTML5 canvas
More native look and feel of mobile JS applications with HTML5 canvas
 
FlAnalyzer
FlAnalyzerFlAnalyzer
FlAnalyzer
 

1.Loading