stevesouders.com/docs/accel-hpws-20130913.pptx Disclaimer: This content does not necessarily reflect the opinions of my employer.

Slides:



Advertisements
Similar presentations
Optimizing Websites with YSlow Tom Lianza Co-Founder Wishlisting.com Tom Lianza Co-Founder Wishlisting.com.
Advertisements

Building Fast 3rd-Party Webapps O'Reilly Velocity Web Performance and Operations Conference 24 June Lessons.
Episodes a shared approach for timing web pages Steve Souders Google Disclaimer: This content does not necessarily reflect.
CS193H: High Performance Web Sites Lecture 4: Class Projects Steve Souders Google
CS193H: High Performance Web Sites Lecture 17: Rule 14 – Make Ajax Cacheable Steve Souders Google
High Performance Web Sites Essential Knowledge for Frontend Engineers
CS193H: High Performance Web Sites Lecture 20: Vol 2 – Don't Scatter Inline Scripts Steve Souders Google
Steve Souders Even Faster Web Sites best practices for faster pages Disclaimer: This content does not necessarily.
CS193H: High Performance Web Sites Lecture 5: Make Fewer HTTP Requests Steve Souders Google
CS193H: High Performance Web Sites Lecture 12: Rule 8 – Make JavaScript and CSS External Steve Souders Google
CS193H: High Performance Web Sites Lecture 19: Vol 2 – Load Scripts Without Blocking Steve Souders Google
CS193H: High Performance Web Sites Lecture 10: Rule 6 – Put Scripts at the Bottom Steve Souders Google
Web Performance Meetup 1 Web Performance 101 Jeremy
Stevesouders.com/docs/velocity-wpo pptx Disclaimer: This content does not necessarily reflect the opinions of my employer.
Best Practices for Speeding Up Your Web Site
©2013 AKAMAI | FASTER FORWARD TM It's all about Performance Measured and Perceived Performance on Desktop and Mobile Devices San Mateo Meetup, July 2013.
CHAPTER 15 WEBPAGE OPTIMIZATION. LEARNING OBJECTIVES How to test your web-page performance How browser and server interactions impact performance What.
PACS – 06/21/14 1 Cache? What is caching? A way to increase the average rate of a process by preferentially using a copy of data in a faster, closer, probably.
Client side performance in Web based Banking applications Divakar Prabhu Infosys Limited (NASDAQ: INFY)
Stevesouders.com/docs/ny-meetup pptx Disclaimer: This content does not necessarily reflect the opinions of my employer.
Stevesouders.com/docs/sfjs pptx Disclaimer: This content does not necessarily reflect the opinions of my employer.
1 Reproduction interdite. © ip-label 2012 Arnaud Becart ip-label.
HTTP HyperText Transfer Protocol. HTTP Uses TCP as its underlying transport protocol Uses port 80 Stateless protocol (i.e. HTTP Server maintains no information.
Chapter 9 Application Layer, HTTP Professor Rick Han University of Colorado at Boulder
How the web works: HTTP and CGI explained
Analysis and Performance Information Systems 337 Prof. Harry Plantinga.
High Performance Websites (Based on Steve Souder’s lecture) By Bhoomi Patel.
Disclaimer: This content does not necessarily reflect the opinions of my employer.
&.zip Disclaimer: This content does not necessarily reflect the opinions of my employer.
Stevesouders.com/docs/velocity-efws pptx Disclaimer: This content does not necessarily reflect the opinions of my employer. flickr.com/photos/ddfic/ /
Mark Phillip markphillip.com 200s, 304s, Expires Headers, HTTP Compression, And You.
Disclaimer: This content does not necessarily reflect the opinions of my employer.
Performance, SEO, Accessibility Ivan Zhekov Telerik Corporation
Lighttpd & Modcache 2009/06/28. Basic lighttpd info Event-driven, single process Event-driven, single process Uses non-block io (network) + writev (memory)
DNN Performance & Scalability Planning, Evaluating & Improving : Part 2.
Krerk Piromsopa. Web Caching Krerk Piromsopa. Department of Computer Engineering. Chulalongkorn University.
Presented By: Zulqarnain Abdul Jabbar Date: 25 th March 2013.
Building Highly Scalable Websites Karol Jarkovsky Sr. Solution Architect
CP476 Internet Computing Lecture 5 : HTTP, WWW and URL 1 Lecture 5. WWW, HTTP and URL Objective: to review the concepts of WWW to understand how HTTP works.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
Adapting web pages for mobile devices Fredrik Andersson Hannes Nevalainen.
CSE 190: Internet E-Commerce Lecture 5. Exam Material Lectures 1-4 (Presentation Tier) –3-tier architecture –HTML –Style sheets –Javascript –DOM –HTTP.
Stevesouders.com/docs/thinkvitamin pptx Disclaimer: This content does not necessarily reflect the opinions of my employer. flickr.com/photos/ddfic/ /
Don't Let Third Parties Slow You Down Arvind Jain, Michael Kleber Google.
Stevesouders.com/docs/amsterdam-meetup pptx Disclaimer: This content does not necessarily reflect the opinions of my employer.
PERFORMANCE ENHANCEMENT IN ASP.NET By Hassan Tariq Session #1.
Case Study: Live Search – Moving to and then away from AJAX Eric Schurman Performance Development Lead Live Search Microsoft.
EE 122: Lecture 21 (HyperText Transfer Protocol - HTTP) Ion Stoica Nov 20, 2001 (*)
Giorgio Sardo Technical Evangelist, Microsoft Corp blogs.msdn.com/Giorgio Session Code: WIA 403.
LURP Details. LURP Lab Details  1.Given a GET … call a proxy CGI script in the same way you would for a normal CGI request  2.This UDP perl.
PHP Quebec 2008 Page 1 High Performance Web Pages Stoyan Stefanov Yahoo! Exceptional Performance PHP Quebec, March.
Web Caching. Why Caching? Faster browsing experience for users Cache hit rate Traffic Prioritization Reduce network bandwidth requirements significantly.
Website: Contact:
Technical SEO tips for Web Developers Richa Bhatia Singsys Pte. Ltd.
Fiddler and Your Website Robert Boedigheimer. About Me Web developer since 1995 Columnist for aspalliance.com Pluralsight Author 3 rd Degree Black Belt,
IF STARBUCKS USED INSTART LOGIC, THEY WOULD HAVE A FASTER RESPONSIVE WEBSITE BY PETER BLUM.
Enhance Your Page Load Speed And Improve Traffic.
Web Cacheability of CRLs David Groep, Jan 26 th, 2009.
Business Case: Improve Overall Service Quality and Customer Experience
Site Optimization for Wordpress
Time is the enemy: Ten Core Lessons for Achieving Peak
Information Systems 337 Prof. Harry Plantinga Assessment.
Even Faster Web Sites best practices for faster pages
Even Faster Web Sites best practices for faster pages
Even Faster Web Sites cc:
Hints and tips for faster web apps
AMP Up Your Website uWestFest 2017.
High Performance Mobile
CSCI-351 Data communication and Networks
Yale Digital Conference 2019
Presentation transcript:

stevesouders.com/docs/accel-hpws pptx Disclaimer: This content does not necessarily reflect the opinions of my employer.

CuzillionSpriteMe YSlow Hammerhead

part 1: Fast is Good

#1. Speed: “First and foremost, we believe that speed is more than a feature. Speed is the most important feature.” #1. Speed: “First and foremost, we believe that speed is more than a feature. Speed is the most important feature.” carsonified.com/blog/business/fred-wilsons-10-golden-principles-of-successful-web-apps/

en.oreilly.com/velocity2009/public/schedule/detail/8523

slideshare.net/stoyan/yslow-20-presentation slideshare.net/stoyan/dont-make-me-wait-or-building-highperformance-web-applications

…shaved 2.2 seconds off the average page load time and increased download conversions by 15.4%! blog.mozilla.com/metrics/category/website-optimization/

We made the new platform 60% faster and this resulted in a 14% increase in donation conversions.

blog.mozilla.com/metrics/category/website-optimization/ …shaved 2.2 seconds off the average page load time and increased download conversions by 15.4%! en.oreilly.com/velocity2009/public/schedule/detail/7709

en.oreilly.com/velocity2008/public/schedule/detail/3632

slideshare.net/EdmundsLabs/how-edmunds-got-in-the-fast-lane-80-reduction-in-page-load-time-in-3-simple-steps

Site speed in search rank Screen shot of blog post …we've decided to take site speed into account in our search rankings. googlewebmastercentral.blogspot.com/2010/04/using-site-speed-in-web-search-ranking.html

part 2: define “performance”

backendfrontend

Top 10

Top 1000

Top 100,000

metrics time-to-first-byte above-the-fold time page load time start render

tail vs. dog A B 2 secs4 secs6 secs8 secs Which is better?

tail vs. dog A B 2 secs4 secs6 secs8 secs Which is better?

tail vs. dog A B 2 secs4 secs6 secs8 secs Which is better?

tail vs. dog A B 2 secs4 secs6 secs6.2 secs Which is better?

synthetic & RUM synthetic: NOT real users – QA, lab, automated ex: Keynote, WebPagetest, Selenium pro: fewer vars, easier isolation, more metrics (rendering, memory, CPU) RUM (Real User Monitoring): JavaScript in real user’s browser ex: GA, Boomerang, mPulse, Episodes pro: reflects real vars – browser, hw, network, page flow, geo, etc.

part 3: best practices

Make Fewer HTTP Requests avg website: 94 HTTP requests, 1551 kB * each HTTP request has overhead – even with persistent connections is it possible to reduce HTTP requests without reducing richness? Yes! * Sep :

inline resources (data: URLs) embed the content of an HTTP response in place of a URL <IMG ALT="Red Star" SRC="data:image/gif;base64,R0lGODl...wAIlEEADs="> good for small images, scripts, & stylesheets if embedded in HTML document, probably not cached => embed in stylesheet instead base64 encoding increases total size works in IE8 (not IE7 and earlier)

CSS sprites multiple CSS background images => one image <div style="background-image: url(’sprite.gif'); background-position: -260px -90px; width: 26px; height: 24px;"> overall size reduced

Add an Expires Header expiration date determines freshness use Expires and Cache-Control: max-age must rev filenames GET /scripts/ common.js HTTP/1.1 Host: HTTP/ OK Content-Type: application/x-javascript Last-Modified: Mon, 22 Sep :14:35 GMT Content-Length: Expires: Sat, 13 Sep :57:34 GMT Cache-Control: max-age= function init() {  

Add an Expires Header Apache: ExpiresActive On ExpiresDefault "access plus 10 years" Header set ETag ""

gzip components GET /scripts/ common.js HTTP/1.1 Host: Accept-Encoding: gzip,deflate HTTP/ OK Content-Type: application/x-javascript Last-Modified: Mon, 22 Sep :14:35 GMT Content-Length: 3066 Expires: Sat, 13 Sep :57:34 GMT Cache-Control: max-age= Content-Encoding: gzip Vary: Accept-Encoding XmoÛHþ\ÿFÖvã*wØoq...   reduces response size ~70% use Vary: or Cache-Control: private

gzip components Apache: AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript application/javascript font/ttf application/octet-stream image/x-icon

shard dominant domains most browsers do 6-connections-per- hostname IE 6-7 do 2-connections-per-hostname

What’s the #1 cause of slow web pages?

JAVASCRIPT!

scripts block blocks parallel downloads and rendering 7 secs: IE 8, FF 3.5, Chr 3, Saf 4 9 secs: IE 6-7, FF 3.0, Chr 1, Op 9-10, Saf 3

all requests containing “.js” are skipped

JavaScript Functions Executed before onload K30% K34% K 7% K??% K35% K55% K29% en.wikipedia.org/wiki99 K19% K33% K16% 29% avg 229 K avg initial payload and execution

1995: scripts in HEAD blocks other downloads (IE 6-7, images in IE, iframes) downloaded sequentially (IE 6-7) blocks rendering during download & parse-execute

2007: move scripts to bottom... doesn’t block other downloads downloaded sequentially in IE 6-7 blocks rendering during download & parse-execute

2009: load scripts async var se = document.createElement(‘script’); se.src = ‘a.js’; document.getElementsByTagName(‘hea d’)[0].appendChild(se); doesn’t block other downloads downloaded in parallel (all browsers) blocks rendering during parse-execute

GMail Mobile /* var... */ get script DOM element's text remove comments eval() when invoked awesome for prefetching JS that might (not) be needed

ControlJS a JavaScript module for making scripts load faster just change HTML inline & external scripts <script type=‘text/cjs’ data-cjssrc=‘main.js’> var name = getName();

ControlJS a JavaScript module for making scripts load faster download without executing <script type=‘text/cjs’ data-cjssrc=‘main.js’ data-cjsexec=false> Later if/when needed: CJS.execScript(src);

Steve Souders stevesouders.com/docs/accel-hpws pptx

WebPagetest Results Chrome: _7N_2CG/ IE9: _JQ_2DJ/

Hootsuite 161 requests, 1.7M xfer, onload 5.06s gzip – save 576K 1M of JS parsed during page load!

Atlassian /software/jira 92 requests, 3.3M xfer, onload 30.7s blank page for 22s strange delays on all pages too many blocking scripts preloader moves bottom scripts higher domain sharding optimize images – save 226K CSS sprite – save 20 requests

Bitbucket /pypy/pypy/commits/all 18 requests, 963K xfer, onload 7s backend is slow – 60/40 blank page for 5.6s lotsa css – 196K & 270K

99designs / requests, 1.46M xfer, onload 5.5s blank page for 1.7s domain sharding – stair step what’s blocking rendering? WPT blocking cache-control: max-age

IronPlanet / 92 requests, 479K xfer, onload 4.4s blank page for 1.9s domain sharding – stair step concat scripts, concat stylesheets CSS sprites – save 19 requests cache-control: max-age don’t close connections

educreations /browse/mathematics/ 37 requests, 812K xfer, onload 2.8s blank page for 1.2s gzip – save 199K optimize images – save 55K domain sharding – stair step

Sunrun / 69 requests, 3.6M xfer, onload 8s blank page for 1.9s backend is slow – document flush domain sharding – stair step concat scripts – so many carousels?! preloader delays sunrun-home-solar.jpg by promoting scripts CSS sprites – save 4 requests & 100K cache-control: max-age don’t close connections