Drupal Frontend Performance & Scalability

Similar documents
Executive Summary. Performance Report for: The web should be fast. How does this affect me?

Executive Summary. Performance Report for: The web should be fast. Top 1 Priority Issues. How does this affect me?

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

Executive Summary. Performance Report for: The web should be fast. Top 4 Priority Issues

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

Keys to Web Front End Performance Optimization

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

AGENCE WEB MADE IN DOM

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

stevesouders.com/docs/web20expo pptx slideshare.net/souders/souders-wpo-web20expo

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

Performance Report for: Report generated: Tuesday, June 30, 2015, 3:21 AM -0700

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

High Performance Drupal

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

High Performance Web Pages

How to get a perfect 100 in Google PageSpeed Insights

Even Faster Web Sites

Beginner's Guide to Performance! Jonathan Rowny

Ajax Performance Analysis. Ryan Breen

Website SEO Checklist

FlexiWeb: Network-Aware Compaction for Accelerating Mobile Web

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

Web Architecture Review Sheet

HTTP/2: What You Need to Know. Robert

Performance Report for: Report generated: Friday, April 13, 2012, 9:12 AM -0700

Performance Report for: Report generated: Friday, April 13, 2012, 9:09 AM -0700

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

A Library and Proxy for SPDY

Website Acceleration with mod_pagespeed

Mobile Assets. Rainer Borchert, Google. Industry Leader

Front End Optimization for Enterprise Grade Applications

Browser behavior can be quite complex, using more HTTP features than the basic exchange, this trace will show us how much gets transferred.

CHAPTER 1: A REFRESHER ON WEB BROWSERS 3

Web Performance in

PageSpeed Insights. Compressing resources with gzip or deflate can reduce the number of bytes sent over the network.

Feedback: Twitter: #TechTalk #wpo #io2011. Make The Web Faster. Joshua Marantz Richard Rabbat Håkon Wium Lie.

PageSpeed Insights. Eliminate render-blocking JavaScript and CSS in above-the-fold content

Website Report for test.com

Caching. Caching Overview

MASTERS COURSE IN FULL STACK WEB APPLICATION DEVELOPMENT W W W. W E B S T A C K A C A D E M Y. C O M

Website Report for

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

Detects Potential Problems. Customizable Data Columns. Support for International Characters

Client-side Debugging. Gary Bettencourt

Oh yes, wpcache comes with a dashboard wpcache is not Plugin!

RKN 2015 Application Layer Short Summary

Love Your Load Times. Trim seconds off page loads, secure private files and make the most of your digital assets

Website Report for colourways.com.au

Fixed Size Ad Specifications

EnGiNeErInG HtMl5 applications for better performance

CS 498RK FALL RESTFUL APIs

Mobile LREC. Dimension: Mobile: 640 (W) x 500 (H) pixels (for News app now, available on mytv SUPER app since Jan 2018)

GroupWise Architecture and Best Practices. WebAccess. Kiran Palagiri Team Lead GroupWise WebAccess

90 Minute Optimization Life Cycle

Large-Scale Web Applications

Gen Z demands instant gratification

Speeding up Web Page Loads with Shandian. Sophia Wang University of Washington

More on Testing and Large Scale Web Apps

Customizing the Blackboard Learn UI & Tag Libraries. George Kroner, Developer Relations Engineer

DATABASE SYSTEMS. Database programming in a web environment. Database System Course, 2016

Lecture Overview. IN5290 Ethical Hacking. Lecture 4: Web hacking 1, Client side bypass, Tampering data, Brute-forcing

Yahoo Traffic Server -a Powerful Cloud Gatekeeper

HTTP (HyperText Transfer Protocol)

Developing ASP.NET MVC Web Applications (486)

Technical Review and Analysis on Students Academic Website Projects Using GTmetrix Web Speed and Optimization Tool

Website Report for facebook.com

Why is My Website Running Slow? Edmond Chan & Feybian Yip Akamai Professional Services September 2018

Advanced Joomla! Dan Rahmel. Apress*

Benchmark Results. Date: 14/03/2011 Version: 1.0 Author: Philippe Humeau. Naming convention

HTTP Security Headers Explained

CSCI-1680 WWW Rodrigo Fonseca

Basics of Web. First published on 3 July 2012 This is the 7 h Revised edition

Browser code isolation

A hitchhiker s guide to technical SEO auditing

A Case Study for Improving the Performance of Web Application

Website Report for bangaloregastro.com

CSE 333 Lecture HTTP

Control for CloudFlare - Installation and Preparations

Checklist for Testing of Web Application

Financial. AngularJS. AngularJS.

HSTS Supports Targeted Surveillance

USER MANUAL. Fooman Speedster (Magento 1) User Manual Quick Links. 1. Installation 2. Set up in Magento 3. Verification Steps 4.

Financial. AngularJS. AngularJS. Download Full Version :

Standard 1 The student will author web pages using the HyperText Markup Language (HTML)

Getting Started with Authoring in Claro

Computer Networks. HTTP and more. Jianping Pan Spring /20/17 CSC361 1

MARKET RESPONSIVE PRESTASHOP THEME USER GUIDE

Lesson 4: Web Browsing

Transcription:

Riverside Drupal Meetup @ Riverside.io August 14, 2014 Christefano Reyes christo@larks.la, @christefano

Who's Your Presenter?

Who's Your Presenter? Why We Care About Performance

Who's Your Presenter? Why We Care About Performance Frontend vs. Backend Performance

Who's Your Presenter? Why We Care About Performance Frontend vs. Backend Performance Anatomy of a Web Page

Who's Your Presenter? Why We Care About Performance Frontend vs. Backend Performance Anatomy of a Web Page What Happens During a Page Load

Who's Your Presenter? Why We Care About Performance Frontend vs. Backend Performance Anatomy of a Web Page What Happens During a Page Load Tools and Techniques

Who's Your Presenter? Why We Care About Performance Frontend vs. Backend Performance Anatomy of a Web Page What Happens During a Page Load Tools and Techniques The Future of HTTP

Who's Your Presenter? Why We Care About Performance Frontend vs. Backend Performance Anatomy of a Web Page What Happens During a Page Load Tools and Techniques The Future of HTTP So, now what?

Who's Your Presenter? Why We Care About Performance Frontend vs. Backend Performance Anatomy of a Web Page What Happens During a Page Load Tools and Techniques The Future of HTTP So, now what? Questions and Comments

Who's Your Presenter? Why We Care About Performance Frontend vs. Backend Performance Anatomy of a Web Page What Happens During a Page Load Tools and Techniques The Future of HTTP So, now what? Resources Questions and Comments

Who's Your Presenter?

Christefano Reyes Drupal Evangelist Drupal.org/user/104 http://largerobot.com @christefano Who's Your Presenter?

Who's Your Presenter? Christefano Reyes Drupal Evangelist Drupal.org/user/104 http://largerobot.com @christefano Exaltation of Larks CEO, Co-Founder www.larks.la @LarksLA

Who's Your Presenter? Christefano Reyes Drupal Evangelist Drupal.org/user/104 http://largerobot.com @christefano Exaltation of Larks CEO, Co-Founder www.larks.la @LarksLA Greater Los Angeles Drupal Drupal Adventure Guide Drupal.LA @GLADrupal

Who's Your Presenter? Christefano Reyes Drupal Evangelist Drupal.org/user/104 http://largerobot.com @christefano Greater Los Angeles Drupal Drupal Adventure Guide Drupal.LA @GLADrupal Exaltation of Larks CEO, Co-Founder www.larks.la @LarksLA Droplabs Lead Burrito Analyst Droplabs.net @Droplabs

Why We Care About Frontend Performance

What We Care About Frontend Performance Amazon: +100ms in Page Load Equals -1% in Sales

What We Care About Frontend Performance Amazon: +100ms in Page Load Equals -1% in Sales Google: +500ms in Page Load Equals -20% Searches

What We Care About Frontend Performance Amazon: +100ms in Page Load Equals -1% in Sales Google: +500ms in Page Load Equals -20% Searches Google Maps: -30% in Filesize Equals +30% Requests

What We Care About Frontend Performance Faster Websites Faster Users More Usage

What We Care About Frontend Performance Nielsen Norman Group: Speed (Especially Slowness) Affects Brand Identity

What We Care About Frontend Performance Nielsen Norman Group: Speed (Especially Slowness) Affects Brand Identity Delays Move Websites Out Of the User's Control

What We Care About Frontend Performance Nielsen Norman Group: Speed (Especially Slowness) Affects Brand Identity Delays Move Websites Out Of the User's Control Design for Human Need, Not Various Technologies

Frontend vs. Backend Performance

Frontend vs. Backend Performance Backend Performance: Type of Hosting Shared / Grid VPS / Cloud Dedicated / Co-Located Types of Hardware Disks (faster DBs!) RAM (more cache!) Cores (faster processing!) Multiple Servers and DBs DB Storage Engines

Frontend vs. Backend Performance Backend Performance: Frontend Performance: Type of Hosting Shared / Grid VPS / Cloud Dedicated / Co-Located Types of Hardware Disks (faster DBs!) RAM (more cache!) Cores (faster processing!) Multiple Servers and DBs DB Storage Engines Overall Page Size Time for DOM to Load Time Until DOM is Rendered Time Until DOM is Functional

Frontend vs. Backend Performance Backend Performance: Frontend Performance: Type of Hosting Shared / Grid VPS / Cloud Dedicated / Co-Located Types of Hardware Disks (faster DBs!) RAM (more cache!) Cores (faster processing!) Multiple Servers and DBs DB Storage Engines Overall Page Size Time for DOM to Load Time Until DOM is Rendered Time Until DOM is Functional (In other words, most frontend performance is experienced in the browser!)

Anatomy of a Web Page

Anatomy of a Web Page What Does a Web Page Contain?

Anatomy of a Web Page What Does a Web Page Contain? HTML CSS and styles JavaScripts Background Images Images and Other Media

What Happens During a Page Load

What Happens During a Page Load In Which Order Do the Contents of a Web Page Load?

What Happens During a Page Load In Which Order Do the Contents of a Web Page Load? HTML CSS and styles JavaScripts Background Images Images and Other Media

What Happens During a Page Load In Which Order Do the Contents of a Web Page Load? HTML CSS and styles JavaScripts Background Images Images and Other Media

What Happens During a Page Load In Which Order Do the Contents of a Web Page Load? HTML CSS and style JavaScripts Background Images Images and Other Media

What Happens During a Page Load In Which Order Do the Contents of a Web Page Load? HTML CSS and styles JavaScripts Background Images Images and Other Media

What Happens During a Page Load In Which Order Do the Contents of a Web Page Load? HTML CSS and styles JavaScripts Background Images Images and Other Media

What Happens During a Page Load So, What's Doing What? HTML Web Application CSS and styles Web App (SASS, LESS, etc.) JavaScripts Background Images Images and Other Media Web App (i.e. Image Derivatives)

Tools and Techniques

Tools and Techniques Firebug "Net" panel http://ex.tl/zni Web Page Test http://ex.tl/zxt Pingdom http://ex.tl/znu YSlow for Firefox / FireBug http://ex.tl/zn3 Google PageSpeed Insights http://ex.tl/znz

Tools and Techniques 1. Reduce Requests Every file produces an HTTP request Fewer requests are better than smaller files HTTP 1.1 says to parallelize 2 components per host Sprites Many Images in One File Shift Into View With background-position Be Careful When Using Both Vertical and Horizontal Sprites Aggregate scripts and styles No redirects Use CSS instead of images Use data: URIs in stylesheets

Tools and Techniques 1a. data: URIs <img src="data:image/png;base64, ivborw0kggoaaaansuheugaaaauaaaafcayaaacnbyblaaaahe leqvqi12p4//8/w38giaxdibke0dhxgljnbaao9txl0y4ohwaa AABJRU5ErkJggg==" alt="red dot" /> Problem: Base64-encoded images and fonts are actually bigger than the original binary file Solution: Use gzip compression

Tools and Techniques 2. Use a CDN Content Delivery Network Akamai CDNLayer Amazon CloudFront Rackspace Cloud Files SimpleCDN Content Servers Distributed Around the World Close Proximity Reduces Roundtrip Times Affordable and Nothing to Lose!

Tools and Techniques 3. Use Caching HTTP Headers Are What Control Caching Goes for Both Browsers and Reverse Proxies Browsers and Proxies Check When Content is Fresh Change Filenames / URLs When Updating Files Set Expires to Dates In Far Future

Tools and Techniques 4. Use Compression Compress Your HTML with GZip To Reduce Page Size Compress Your CSS and JavaScripts Always Compression (and Aggregate) Your CSS & JS! Always Use Advanced Aggregator (AKA advagg) in Drupal 6! Use mod_deflate or NginxHttpGzipModule Use Google PageSpeed (If You Can) Makes Files Smaller Combines Many Files Into One Extends Browser Cache Times

Tools and Techniques 5. CSS Up Top Pages Render After CSS is Loaded Loading CSS Later? FOUC and Re-rendering :( 6. JavaScript Down Below Scripts Load Sequentially Degrades Somewhat Gracefully Loading Scripts First? They Block Page Rendering onclick, onhover, etc. Handlers Kill Performance

Tools and Techniques 7. Minify CSS and JavaScript Removes Comments and Whitespace Minified CSS & JS + GZip Compression > GZip alone Minify Core and Contributed CSS and JavaScript Speedy Module and UglifyJS (Drupal 7) Advanced Aggregator Module (Drupal 6) Why Don't We Minify HTML, Too? HTML is Fragile and Constantly Changing Minify Just the Content (Not the Page) Look Out for Conditional Tags Other Resources: Tidy, Twig's spaceless tag, etc.

Tools and Techniques 8. Parallelization (AKA Pipelining and Multi-Threading) HTTP 1.1 States Browsers Should Make a Maximum of 2 Requests Per Hostname In Parallel Most Browsers Parallelize More Chrome, Firefox, Opera & Safari: 6 IE7: 2 IE8: 6 IE9: 8 "Faking It" With the DNS Tricks Is Not a Long-Term Solution Reduce Your DNS Lookups! HTTP 2.0 is coming Use Cookieless Domains

Tools and Techniques: YSlow Minimize HTTP requests Use a CDN Add an Expires header GZip components Put stylesheets at the top Put scripts at the bottom Avoid CSS expressions Make JS and CSS external Reduce DNS lookups Minify JS and CSS Avoid redirects Remove duplicate scripts Configure ETags Make AJAX cacheable Post-load Components Preload Components Use GET for AJAX Requests Reduce # of DOM Elements Split Components Across Domains Minimize # of iframes No 404s Reduce Cookie Size Etc., etc.

The Future of HTTP

The Past HTTP 0.9 (1991) HTTP 1.0 (1996) HTTP 1.1 (1997-1999) HTTP-NG The Future of HTTP

The Past HTTP 0.9 (1991) HTTP 1.0 (1996) HTTP 1.1 (1997-1999) HTTP-NG The Present HTTP 1.1 (2013) The Future of HTTP

The Future of HTTP The Past HTTP 0.9 (1991) HTTP 1.0 (1996) HTTP 1.1 (1997-1999) HTTP-NG The Present HTTP 1.1 (2013) The Future HTTP 2.0 Google SPDY Microsoft HTTP Speed+Mobility

Remember YSlow? Minimize HTTP requests Use a CDN Add an Expires header GZip components Put stylesheets at the top Put scripts at the bottom Avoid CSS expressions Make JS and CSS external Reduce DNS lookups Minify JS and CSS Avoid redirects Remove duplicate scripts Configure ETags Make AJAX cacheable Post-load Components Preload Components Use GET for AJAX Requests Reduce # of DOM Elements Split Components Across Domains Minimize # of iframes No 404s Reduce Cookie Size Etc., etc.

SPDY Fixes Problems With HTTP 1.1: Minimize HTTP requests Use a CDN Add an Expires header GZip components Put stylesheets at the top Put scripts at the bottom Avoid CSS expressions Make JS and CSS external Reduce DNS lookups Minify JS and CSS Configure ETags Make AJAX cacheable Post-load Components Preload Components Use GET for AJAX Requests Reduce # of DOM Elements Split Components Across Domains

So, now what?

So, now what? 1. Turn on your caching! Expires headers CDNs Application-specific caching, aggregating, etc. Etc.

So, now what? 1. Turn on your caching! Expires headers CDNs Application-specific caching, aggregating, etc. Etc. 2. Use Google PageSpeed and SPDY If you have access to install Apache modules or Nginx patches

So, now what? 1. Turn on your caching! Expires headers CDNs Application-specific caching, aggregating, etc. Etc. 2. Use Google PageSpeed and SPDY If you have access to install Apache modules or Nginx patches 3. Run YSlow on your website or web app If you don t already have Firebug installed, ask me to show you

Resources

Resources Firebug "Net" panel http://ex.tl/zni AOL Page Test http://ex.tl/znw Pingdom http://ex.tl/znu YSlow for Firefox / Firebug http://ex.tl/zn3 Chrome Dev Panel http://ex.tl/znh Google PageSpeed http://ex.tl/znz Steve Souders http://ex.tl/zn5 Wim Leers http://ex.tl/znq Mike Carper / mikeytown2 http://ex.tl/znu Khalid Bayeldin / 2bits http://ex.tl/znt Konstantin Kaefer http://ex.tl/zns Matt Farina http://ex.tl/znh

Why Performance Matters http://ex.tl/zny Website Response Times http://ex.tl/znc YSlow FAQ http://ex.tl/znk More Resources http://ex.tl/zno Modules Tagged "Performance and Scalability" http://ex.tl/znj Drupal Core Issues Tagged "Performance" http://ex.tl/zgv High Performance Drupal Group and Meetups http://ex.tl/zn4 Make the Web Faster http://ex.tl/znz Google mod_pagespeed http://ex.tl/zn9 Google SPDY

Questions? Comments? Give Your Feedback! @christefano