SlideShare a Scribd company logo
1 of 21
Website Performance
Hugo Fonseca – Technical Lead
Thursday 5th February 2015
Why Should We Care about Website
Performance ?
“ Nearly half of the web users expect a site to load in 2
seconds or less, and they tend to abandon a site that isn’t
loaded within 3 seconds, according to Akamai and
Gomez.com”
WEBSITE PERFORMANCE – FACTS AND STATS
• 47% of consumers expect a web page to load in 2 seconds or
less
• 40% of people abandon a website that takes more than 3
seconds to load
• 75% of the 1,058 people asked would not return to websites that
took longer than four seconds to load
• A 1 second delay in page response can result in a 7% reduction
in conversions
• If an e-commerce site is making £100,000 per day, a 1 second
page delay could potentially cost you £2.5 million in lost sales
WEBSITE PERFORMANCE – FACTS AND STATS
Average web page size, with an average of 95 HTTP pull requests
per page
Most Common Reasons For a Poor
Performance
MOST COMMON REASONS FOR A POOR PERFORMANCE
• Bloated CMS Templates
Typical WordPress themes are crammed full of features. Many will be third-party
styles and widgets the author has added to make the theme more useful or
attractive to buyers. Many features will not be used but the files are still present
• HTML5/CSS3 Boilerplates
A boilerplate may save time but it’s important to understand they are generic
templates. The styles and scripts contain features you’ll never use and the
HTML can be verbose with deeply-nested elements and long-winded,
descriptive class names. Few developers bother to remove redundant code
• Carelessness
Developers are inherently lazy; we write software to make tasks easier.
However, if you’re not concerned about the consequences of page weight, you
should have your web license revoked
• Too many requests
Each request takes time to process, as it includes time for DNS Lookup, SSL
Performance Optimisations
PERFORMANCE OPTIMISATIONS
• Cleanup Code
Remove comments, remove unnecessary HTML, JS and CSS
• Combine and Minify Assets (JS and CSS)
Combine the JS files and libraries into one JS file and minify. The same for CSS
to reduce number of requests
• Load CSS on the <head> and JS just before </body>
Loading CSS first, prevents additional repaints and reflows, and will make the
page look much better from the beginning and JS in the end to allow for the
page to be rendered without being blocked while loading the scripts
• Try to load scripts as asynchronous
This way, the page rendering won’t be blocked and triggers the
$(document).ready() ,much sooner. All social media plugins and analytics
should be loaded asynchronously
• Make use of sprites whenever possible
PERFORMANCE OPTIMISATIONS
• Cache
Make an effective use of cache. Cache assets, cache DB queries, cache
templates / pre-render templates. Also implement Cache Busters. The preferred
URL fingerprint is /assets/9833e4/css/style.css, as other solutions might have
problems with proxies and CDNs
• Download assets from cookieless domains
It saves a lot of time, when requesting the assets
• Download assets from multiple subdomains / CDNs
static.domain.com, static1.domain.com, etc, as browsers usually have a limit on
how many concurrent connections they establish with each domain, which
means, the first set of assets, needs to be downloaded before starting new
connections
• Consider using Google CDN
Google CDN is usually very fast, and physically close to the client. And the client
might already have the asset cached
PERFORMANCE OPTIMISATIONS
• Enable Compression
Enabling compression (e.g. GZIP) to make the file size much smaller to
download. With jQuery ou can get a gain of 88% when compared to the original
size – jQuery (273K), Minified (90k), Compressed (32K)
• Remove inline scripts and styles
Move them into files to make them cacheable
• Serve adequately sized images
If we only need a 50x50px image, just serve that image. Don’t rely on the
browser to resize, as it will still download the full size image
• Optimize images
Remove unnecessary data from images (strip irrelevant information), compress,
and if it is a JPEG, make use of the progressive version, as this will make the
image start appearing sooner
PERFORMANCE OPTIMISATIONS
• Prevent excessive redirects
Each redirect costs time, so avoid unnecessary redirections
• Consider using Nginx for serving static content
Nginx is very fast and optimised to serve static content
• Consider using techniques like lazy loading
If the content is not important for SEO or another reason, consider triggering the
load, only after the page is served
• Consider hosting images, web server and database server in a
different machines
This reduces the load on each server, which translates in faster response times
Real Speed vs Apparent Speed
“Even if we optimise all the aspects, we might still have a
website that’ll take longer than we wished for. We can make
use of several techniques to make the site apparently faster.”
INTRODUCING WEBPAGETEST.ORG SPEED INDEX
The Speed Index is the average time at which visible parts of the
page are displayed. It takes the visual progress of the visible page
loading and computes an overall score for how quickly the content
painted. The lower the number the better.
REAL SPEED VS APPARENT SPEED
REAL SPEED VS APPARENT SPEED
REAL SPEED VS APPARENT SPEED
CASE-STUDY – SHOPCADE.COM
Results after a set of performance improvements applied on the
backend and the frontend:
Before: http://www.webpagetest.org/result/140326_FS_H63/
After: http://www.webpagetest.org/result/140422_MY_DEX/
Note: Just 1.3 seconds were to download a web font.
CASE-STUDY – THEVENTURE.COM
theventure.com -
http://www.webpagetest.org/result/141024_C5_SXP/ vs
shopcade.com
QUESTIONS & ANSWERS
USEFUL LINKS
• WebPageTest.Org
http://www.webpagetest.org
• Speed Index
https://sites.google.com/a/webpagetest.org/docs/using-
webpagetest/metrics/speed-index
• Using Site Speed in Web Search Ranking
http://googlewebmastercentral.blogspot.co.uk/2010/04/using-site-speed-in-web-
search-ranking.html
• Speed is a Killer
https://blog.kissmetrics.com/speed-is-a-killer/
• Google Web Fundamentals
https://developers.google.com/web/fundamentals/performance/
Thank
YOU

More Related Content

What's hot

Using MAMP for Web Development
Using MAMP for Web DevelopmentUsing MAMP for Web Development
Using MAMP for Web DevelopmentEric Greene
 
Core Web Vitals Optimization for any website, especially WordPress
Core Web Vitals Optimization for any website, especially WordPressCore Web Vitals Optimization for any website, especially WordPress
Core Web Vitals Optimization for any website, especially WordPressClementYo
 
WordCamp RVA 2011 - Performance & Tuning
WordCamp RVA 2011 - Performance & TuningWordCamp RVA 2011 - Performance & Tuning
WordCamp RVA 2011 - Performance & TuningTimothy Wood
 
Client side performance analysis
Client side performance analysisClient side performance analysis
Client side performance analysisTsimafei Avilin
 
Stress Test Drupal on Amazon EC2 vs. RackSpace cloud
Stress Test Drupal on Amazon EC2 vs. RackSpace cloudStress Test Drupal on Amazon EC2 vs. RackSpace cloud
Stress Test Drupal on Amazon EC2 vs. RackSpace cloudAndy Kucharski
 
Getting SEO performance in Angular Meteor with ngmeta
Getting SEO performance in Angular Meteor with ngmetaGetting SEO performance in Angular Meteor with ngmeta
Getting SEO performance in Angular Meteor with ngmetaWill Haire
 
A idea of Powerful WooCmmerce Site
A idea of Powerful WooCmmerce SiteA idea of Powerful WooCmmerce Site
A idea of Powerful WooCmmerce Site秀高 岡本
 
Building WordPress sites with AngularJS and the RESTful plugin JSON API @ Dev...
Building WordPress sites with AngularJS and the RESTful plugin JSON API @ Dev...Building WordPress sites with AngularJS and the RESTful plugin JSON API @ Dev...
Building WordPress sites with AngularJS and the RESTful plugin JSON API @ Dev...Eric Greene
 
Best cdn for e commerce
Best cdn for e commerceBest cdn for e commerce
Best cdn for e commerceericlevis012
 
Piecing Together the WordPress Puzzle
Piecing Together the WordPress PuzzlePiecing Together the WordPress Puzzle
Piecing Together the WordPress PuzzleBusiness Vitality LLC
 
Improving Drupal Performances
Improving Drupal PerformancesImproving Drupal Performances
Improving Drupal PerformancesVladimir Ilic
 
Make Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speedMake Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speedAndy Kucharski
 
How Can You Make Your Website Faster?
How Can You Make Your Website Faster?How Can You Make Your Website Faster?
How Can You Make Your Website Faster?HTS Hosting
 
Measuring Web Performance
Measuring Web Performance Measuring Web Performance
Measuring Web Performance Dave Olsen
 
WPblog's Ultimate WordPress Guide to Boost Your Website Performance
WPblog's Ultimate WordPress Guide to Boost Your Website Performance WPblog's Ultimate WordPress Guide to Boost Your Website Performance
WPblog's Ultimate WordPress Guide to Boost Your Website Performance Jessica Ervin
 
Wordcamp2009
Wordcamp2009Wordcamp2009
Wordcamp2009joetek
 
Speeding up your WordPress Site - WordCamp Toronto 2015
Speeding up your WordPress Site - WordCamp Toronto 2015Speeding up your WordPress Site - WordCamp Toronto 2015
Speeding up your WordPress Site - WordCamp Toronto 2015Alan Lok
 
Building Creative Product Extensions with Experience Manager
Building Creative Product Extensions with Experience ManagerBuilding Creative Product Extensions with Experience Manager
Building Creative Product Extensions with Experience Managerconnectwebex
 

What's hot (20)

Using MAMP for Web Development
Using MAMP for Web DevelopmentUsing MAMP for Web Development
Using MAMP for Web Development
 
Core Web Vitals Optimization for any website, especially WordPress
Core Web Vitals Optimization for any website, especially WordPressCore Web Vitals Optimization for any website, especially WordPress
Core Web Vitals Optimization for any website, especially WordPress
 
WordCamp RVA 2011 - Performance & Tuning
WordCamp RVA 2011 - Performance & TuningWordCamp RVA 2011 - Performance & Tuning
WordCamp RVA 2011 - Performance & Tuning
 
Client side performance analysis
Client side performance analysisClient side performance analysis
Client side performance analysis
 
Stress Test Drupal on Amazon EC2 vs. RackSpace cloud
Stress Test Drupal on Amazon EC2 vs. RackSpace cloudStress Test Drupal on Amazon EC2 vs. RackSpace cloud
Stress Test Drupal on Amazon EC2 vs. RackSpace cloud
 
Getting SEO performance in Angular Meteor with ngmeta
Getting SEO performance in Angular Meteor with ngmetaGetting SEO performance in Angular Meteor with ngmeta
Getting SEO performance in Angular Meteor with ngmeta
 
A idea of Powerful WooCmmerce Site
A idea of Powerful WooCmmerce SiteA idea of Powerful WooCmmerce Site
A idea of Powerful WooCmmerce Site
 
Building WordPress sites with AngularJS and the RESTful plugin JSON API @ Dev...
Building WordPress sites with AngularJS and the RESTful plugin JSON API @ Dev...Building WordPress sites with AngularJS and the RESTful plugin JSON API @ Dev...
Building WordPress sites with AngularJS and the RESTful plugin JSON API @ Dev...
 
Best cdn for e commerce
Best cdn for e commerceBest cdn for e commerce
Best cdn for e commerce
 
Piecing Together the WordPress Puzzle
Piecing Together the WordPress PuzzlePiecing Together the WordPress Puzzle
Piecing Together the WordPress Puzzle
 
Improving Drupal Performances
Improving Drupal PerformancesImproving Drupal Performances
Improving Drupal Performances
 
Make Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speedMake Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speed
 
How Can You Make Your Website Faster?
How Can You Make Your Website Faster?How Can You Make Your Website Faster?
How Can You Make Your Website Faster?
 
Measuring Web Performance
Measuring Web Performance Measuring Web Performance
Measuring Web Performance
 
WPblog's Ultimate WordPress Guide to Boost Your Website Performance
WPblog's Ultimate WordPress Guide to Boost Your Website Performance WPblog's Ultimate WordPress Guide to Boost Your Website Performance
WPblog's Ultimate WordPress Guide to Boost Your Website Performance
 
Wordcamp2009
Wordcamp2009Wordcamp2009
Wordcamp2009
 
Web performance
Web performanceWeb performance
Web performance
 
Speeding up your WordPress Site - WordCamp Toronto 2015
Speeding up your WordPress Site - WordCamp Toronto 2015Speeding up your WordPress Site - WordCamp Toronto 2015
Speeding up your WordPress Site - WordCamp Toronto 2015
 
Performance tuning of Websites
Performance tuning of WebsitesPerformance tuning of Websites
Performance tuning of Websites
 
Building Creative Product Extensions with Experience Manager
Building Creative Product Extensions with Experience ManagerBuilding Creative Product Extensions with Experience Manager
Building Creative Product Extensions with Experience Manager
 

Viewers also liked

test title
test titletest title
test titleukst
 
экспо
экспоэкспо
экспоOlesay
 
estado de la materiaPresentation1
estado de la materiaPresentation1estado de la materiaPresentation1
estado de la materiaPresentation1madeline hernandez
 
A Conversation with the 2015 iNACOL National Blended & Online Learning Teache...
A Conversation with the 2015 iNACOL National Blended & Online Learning Teache...A Conversation with the 2015 iNACOL National Blended & Online Learning Teache...
A Conversation with the 2015 iNACOL National Blended & Online Learning Teache...natalieraeabel
 
Asylum Seekers Australia
Asylum Seekers AustraliaAsylum Seekers Australia
Asylum Seekers Australiadsubs
 
Paradigma positivista
Paradigma positivistaParadigma positivista
Paradigma positivistaAzuajeMaria
 
Inmunohistoquimica
InmunohistoquimicaInmunohistoquimica
InmunohistoquimicaSarai León
 
Disaster mitigation - land slide
Disaster mitigation - land slideDisaster mitigation - land slide
Disaster mitigation - land slideParth Sadaria
 

Viewers also liked (11)

test title
test titletest title
test title
 
экспо
экспоэкспо
экспо
 
estado de la materiaPresentation1
estado de la materiaPresentation1estado de la materiaPresentation1
estado de la materiaPresentation1
 
Brazil ship of foolish
Brazil ship of foolishBrazil ship of foolish
Brazil ship of foolish
 
A Conversation with the 2015 iNACOL National Blended & Online Learning Teache...
A Conversation with the 2015 iNACOL National Blended & Online Learning Teache...A Conversation with the 2015 iNACOL National Blended & Online Learning Teache...
A Conversation with the 2015 iNACOL National Blended & Online Learning Teache...
 
Georgie Resume
Georgie ResumeGeorgie Resume
Georgie Resume
 
Asylum Seekers Australia
Asylum Seekers AustraliaAsylum Seekers Australia
Asylum Seekers Australia
 
Paradigma positivista
Paradigma positivistaParadigma positivista
Paradigma positivista
 
Inmunohistoquimica
InmunohistoquimicaInmunohistoquimica
Inmunohistoquimica
 
Nsaids
NsaidsNsaids
Nsaids
 
Disaster mitigation - land slide
Disaster mitigation - land slideDisaster mitigation - land slide
Disaster mitigation - land slide
 

Similar to Website Performance

Breaking the Speed Limit: Faster Websites Win
Breaking the Speed Limit: Faster Websites WinBreaking the Speed Limit: Faster Websites Win
Breaking the Speed Limit: Faster Websites WinJonathan Hochman
 
10 things you can do to speed up your web app today stir trek edition
10 things you can do to speed up your web app today   stir trek edition10 things you can do to speed up your web app today   stir trek edition
10 things you can do to speed up your web app today stir trek editionChris Love
 
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 PerormanceSpark::red
 
How_To_Soup_Up_Your_Farm
How_To_Soup_Up_Your_FarmHow_To_Soup_Up_Your_Farm
How_To_Soup_Up_Your_FarmNigel Price
 
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...Amazon Web Services
 
Optimizing Your WordPress Site: Why speed matters, and how to get there
Optimizing Your WordPress Site: Why speed matters, and how to get thereOptimizing Your WordPress Site: Why speed matters, and how to get there
Optimizing Your WordPress Site: Why speed matters, and how to get thereStephen Bell
 
Optimizing WordPress Performance
Optimizing WordPress PerformanceOptimizing WordPress Performance
Optimizing WordPress PerformanceDouglas Yuen
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax ApplicationsSiarhei Barysiuk
 
I Can Haz More Performanz?
I Can Haz More Performanz?I Can Haz More Performanz?
I Can Haz More Performanz?Andy Melichar
 
Minimize website page loading time – 20+ advanced SEO tips
Minimize website page loading time – 20+ advanced SEO tipsMinimize website page loading time – 20+ advanced SEO tips
Minimize website page loading time – 20+ advanced SEO tipsCgColors
 
BrightonSEO 2019 - Edge SEO - Using CDNs To Perform SEO On The Edge
BrightonSEO 2019 - Edge SEO - Using CDNs To Perform SEO On The EdgeBrightonSEO 2019 - Edge SEO - Using CDNs To Perform SEO On The Edge
BrightonSEO 2019 - Edge SEO - Using CDNs To Perform SEO On The EdgeDan Taylor
 
Squeeze Maximum Performance From Your Joomla Website
Squeeze Maximum Performance From Your Joomla WebsiteSqueeze Maximum Performance From Your Joomla Website
Squeeze Maximum Performance From Your Joomla WebsiteSiteGround.com
 
Tips tricks deliver_high_performing_secure_web_pages
Tips tricks deliver_high_performing_secure_web_pagesTips tricks deliver_high_performing_secure_web_pages
Tips tricks deliver_high_performing_secure_web_pagesAditya Singh
 
Dynamic Content Acceleration: Amazon CloudFront and Amazon Route 53 (ARC309) ...
Dynamic Content Acceleration: Amazon CloudFront and Amazon Route 53 (ARC309) ...Dynamic Content Acceleration: Amazon CloudFront and Amazon Route 53 (ARC309) ...
Dynamic Content Acceleration: Amazon CloudFront and Amazon Route 53 (ARC309) ...Amazon Web Services
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuningJohn McCaffrey
 
Oracle UCM: Web Site Performance Tuning
Oracle UCM: Web Site Performance TuningOracle UCM: Web Site Performance Tuning
Oracle UCM: Web Site Performance TuningBrian Huff
 
Boston Web Performance Meetup: The Render Chain and You
Boston Web Performance Meetup: The Render Chain and YouBoston Web Performance Meetup: The Render Chain and You
Boston Web Performance Meetup: The Render Chain and Youmattringel
 

Similar to Website Performance (20)

Web Performance Optimization (WPO)
Web Performance Optimization (WPO)Web Performance Optimization (WPO)
Web Performance Optimization (WPO)
 
Breaking the Speed Limit: Faster Websites Win
Breaking the Speed Limit: Faster Websites WinBreaking the Speed Limit: Faster Websites Win
Breaking the Speed Limit: Faster Websites Win
 
10 things you can do to speed up your web app today stir trek edition
10 things you can do to speed up your web app today   stir trek edition10 things you can do to speed up your web app today   stir trek edition
10 things you can do to speed up your web app today stir trek edition
 
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
 
How_To_Soup_Up_Your_Farm
How_To_Soup_Up_Your_FarmHow_To_Soup_Up_Your_Farm
How_To_Soup_Up_Your_Farm
 
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...
 
Optimizing Your WordPress Site: Why speed matters, and how to get there
Optimizing Your WordPress Site: Why speed matters, and how to get thereOptimizing Your WordPress Site: Why speed matters, and how to get there
Optimizing Your WordPress Site: Why speed matters, and how to get there
 
Optimizing WordPress Performance
Optimizing WordPress PerformanceOptimizing WordPress Performance
Optimizing WordPress Performance
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax Applications
 
Tips to improve your website performance
Tips to improve your website performanceTips to improve your website performance
Tips to improve your website performance
 
I Can Haz More Performanz?
I Can Haz More Performanz?I Can Haz More Performanz?
I Can Haz More Performanz?
 
Minimize website page loading time – 20+ advanced SEO tips
Minimize website page loading time – 20+ advanced SEO tipsMinimize website page loading time – 20+ advanced SEO tips
Minimize website page loading time – 20+ advanced SEO tips
 
BrightonSEO 2019 - Edge SEO - Using CDNs To Perform SEO On The Edge
BrightonSEO 2019 - Edge SEO - Using CDNs To Perform SEO On The EdgeBrightonSEO 2019 - Edge SEO - Using CDNs To Perform SEO On The Edge
BrightonSEO 2019 - Edge SEO - Using CDNs To Perform SEO On The Edge
 
Squeeze Maximum Performance From Your Joomla Website
Squeeze Maximum Performance From Your Joomla WebsiteSqueeze Maximum Performance From Your Joomla Website
Squeeze Maximum Performance From Your Joomla Website
 
Tips tricks deliver_high_performing_secure_web_pages
Tips tricks deliver_high_performing_secure_web_pagesTips tricks deliver_high_performing_secure_web_pages
Tips tricks deliver_high_performing_secure_web_pages
 
Dynamic Content Acceleration: Amazon CloudFront and Amazon Route 53 (ARC309) ...
Dynamic Content Acceleration: Amazon CloudFront and Amazon Route 53 (ARC309) ...Dynamic Content Acceleration: Amazon CloudFront and Amazon Route 53 (ARC309) ...
Dynamic Content Acceleration: Amazon CloudFront and Amazon Route 53 (ARC309) ...
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuning
 
Salesforce Performance hacks - Client Side
Salesforce Performance hacks - Client SideSalesforce Performance hacks - Client Side
Salesforce Performance hacks - Client Side
 
Oracle UCM: Web Site Performance Tuning
Oracle UCM: Web Site Performance TuningOracle UCM: Web Site Performance Tuning
Oracle UCM: Web Site Performance Tuning
 
Boston Web Performance Meetup: The Render Chain and You
Boston Web Performance Meetup: The Render Chain and YouBoston Web Performance Meetup: The Render Chain and You
Boston Web Performance Meetup: The Render Chain and You
 

Website Performance

  • 1. Website Performance Hugo Fonseca – Technical Lead Thursday 5th February 2015
  • 2. Why Should We Care about Website Performance ? “ Nearly half of the web users expect a site to load in 2 seconds or less, and they tend to abandon a site that isn’t loaded within 3 seconds, according to Akamai and Gomez.com”
  • 3. WEBSITE PERFORMANCE – FACTS AND STATS • 47% of consumers expect a web page to load in 2 seconds or less • 40% of people abandon a website that takes more than 3 seconds to load • 75% of the 1,058 people asked would not return to websites that took longer than four seconds to load • A 1 second delay in page response can result in a 7% reduction in conversions • If an e-commerce site is making £100,000 per day, a 1 second page delay could potentially cost you £2.5 million in lost sales
  • 4. WEBSITE PERFORMANCE – FACTS AND STATS Average web page size, with an average of 95 HTTP pull requests per page
  • 5. Most Common Reasons For a Poor Performance
  • 6. MOST COMMON REASONS FOR A POOR PERFORMANCE • Bloated CMS Templates Typical WordPress themes are crammed full of features. Many will be third-party styles and widgets the author has added to make the theme more useful or attractive to buyers. Many features will not be used but the files are still present • HTML5/CSS3 Boilerplates A boilerplate may save time but it’s important to understand they are generic templates. The styles and scripts contain features you’ll never use and the HTML can be verbose with deeply-nested elements and long-winded, descriptive class names. Few developers bother to remove redundant code • Carelessness Developers are inherently lazy; we write software to make tasks easier. However, if you’re not concerned about the consequences of page weight, you should have your web license revoked • Too many requests Each request takes time to process, as it includes time for DNS Lookup, SSL
  • 8. PERFORMANCE OPTIMISATIONS • Cleanup Code Remove comments, remove unnecessary HTML, JS and CSS • Combine and Minify Assets (JS and CSS) Combine the JS files and libraries into one JS file and minify. The same for CSS to reduce number of requests • Load CSS on the <head> and JS just before </body> Loading CSS first, prevents additional repaints and reflows, and will make the page look much better from the beginning and JS in the end to allow for the page to be rendered without being blocked while loading the scripts • Try to load scripts as asynchronous This way, the page rendering won’t be blocked and triggers the $(document).ready() ,much sooner. All social media plugins and analytics should be loaded asynchronously • Make use of sprites whenever possible
  • 9. PERFORMANCE OPTIMISATIONS • Cache Make an effective use of cache. Cache assets, cache DB queries, cache templates / pre-render templates. Also implement Cache Busters. The preferred URL fingerprint is /assets/9833e4/css/style.css, as other solutions might have problems with proxies and CDNs • Download assets from cookieless domains It saves a lot of time, when requesting the assets • Download assets from multiple subdomains / CDNs static.domain.com, static1.domain.com, etc, as browsers usually have a limit on how many concurrent connections they establish with each domain, which means, the first set of assets, needs to be downloaded before starting new connections • Consider using Google CDN Google CDN is usually very fast, and physically close to the client. And the client might already have the asset cached
  • 10. PERFORMANCE OPTIMISATIONS • Enable Compression Enabling compression (e.g. GZIP) to make the file size much smaller to download. With jQuery ou can get a gain of 88% when compared to the original size – jQuery (273K), Minified (90k), Compressed (32K) • Remove inline scripts and styles Move them into files to make them cacheable • Serve adequately sized images If we only need a 50x50px image, just serve that image. Don’t rely on the browser to resize, as it will still download the full size image • Optimize images Remove unnecessary data from images (strip irrelevant information), compress, and if it is a JPEG, make use of the progressive version, as this will make the image start appearing sooner
  • 11. PERFORMANCE OPTIMISATIONS • Prevent excessive redirects Each redirect costs time, so avoid unnecessary redirections • Consider using Nginx for serving static content Nginx is very fast and optimised to serve static content • Consider using techniques like lazy loading If the content is not important for SEO or another reason, consider triggering the load, only after the page is served • Consider hosting images, web server and database server in a different machines This reduces the load on each server, which translates in faster response times
  • 12. Real Speed vs Apparent Speed “Even if we optimise all the aspects, we might still have a website that’ll take longer than we wished for. We can make use of several techniques to make the site apparently faster.”
  • 13. INTRODUCING WEBPAGETEST.ORG SPEED INDEX The Speed Index is the average time at which visible parts of the page are displayed. It takes the visual progress of the visible page loading and computes an overall score for how quickly the content painted. The lower the number the better.
  • 14. REAL SPEED VS APPARENT SPEED
  • 15. REAL SPEED VS APPARENT SPEED
  • 16. REAL SPEED VS APPARENT SPEED
  • 17. CASE-STUDY – SHOPCADE.COM Results after a set of performance improvements applied on the backend and the frontend: Before: http://www.webpagetest.org/result/140326_FS_H63/ After: http://www.webpagetest.org/result/140422_MY_DEX/ Note: Just 1.3 seconds were to download a web font.
  • 18. CASE-STUDY – THEVENTURE.COM theventure.com - http://www.webpagetest.org/result/141024_C5_SXP/ vs shopcade.com
  • 20. USEFUL LINKS • WebPageTest.Org http://www.webpagetest.org • Speed Index https://sites.google.com/a/webpagetest.org/docs/using- webpagetest/metrics/speed-index • Using Site Speed in Web Search Ranking http://googlewebmastercentral.blogspot.co.uk/2010/04/using-site-speed-in-web- search-ranking.html • Speed is a Killer https://blog.kissmetrics.com/speed-is-a-killer/ • Google Web Fundamentals https://developers.google.com/web/fundamentals/performance/

Editor's Notes

  1. Just to mention that this is on a project by project basis. Some improvements might not be worth considering, depending on bugdet, project duration, time schedules This is “extreme” optimisation
  2. Images are the greatest chunk
  3. Simultaneous connections (6) which means resources will have to finish download before starting a new connection. Alternative would be using parallel connections from different domains
  4. Since crawlers/spiders are robots, we need to help them to understand the content, by using the correct meta tags, semantic tags, alt attributes
  5. You can clearly see when they were implemented by looking at the graph
  6. See links and show the video feature, the dom load event vs page load, and even events loaded after the page load Talk about the number of requests, use sprites See webfont example
  7. Show comparison