SlideShare a Scribd company logo
Designing for Performance
Why bother? http://assets.en.oreilly.com/1/event/29/Keynote%20Presentation%202.pdf
 
The  Performance Bible
 
Rule #1: Make Fewer Http  Requests
 
 
 
Un-Spriteable images
 
login.js global.js combined.js -> Development Production ->
External JavaScript & CSS
2) Use a CDN
3) Use Expires Headers
Cache-Control: max-age=315360000
www.slideshare.net/combined.css?v=123456 www.slideshare.net/combined.css?v=435678 <generate new version of combined.css,  since one of the css files changed>
External CSS & Javascript WITHOUT Far-future expires headers
External Images without far-future expires headers
Measuring Client-Side Performance
Server-Side Performance
Understand where your bottlenecks are
memcached
 
 
Be Lazy
Think Ahead!
Building performance into your culture

More Related Content

PPTX
An Overview on Nuxt.js
PPTX
Tibco advantage
PPTX
Govern your guest accounts – How to use Azure Identity Governance
PPSX
Windows Azure Cloud Services
PPTX
St. Louis Day of .NET 2013 - Building Your Dev and Test Sandbox with Windows ...
PDF
Bundling & minification
PPTX
PPTX
Web Performance Optimization com ASP.NET Core
An Overview on Nuxt.js
Tibco advantage
Govern your guest accounts – How to use Azure Identity Governance
Windows Azure Cloud Services
St. Louis Day of .NET 2013 - Building Your Dev and Test Sandbox with Windows ...
Bundling & minification
Web Performance Optimization com ASP.NET Core

What's hot (20)

PPTX
Packing for the Web with Webpack
PPTX
Introduction To Gatsbyjs
PDF
Front-End Performance Optimization in WordPress
PDF
WebGL의 무궁무진한 가능성
PPTX
Bundling your front-end with Webpack
PDF
Node.js + NoSQL
PDF
Production optimization with React and Webpack
PDF
Thu 1500 lacoul_shamod_color
PPTX
Let's talk real-world private cloud implementation!
PPTX
Web development using nodejs
PDF
Extensions.pdf
PPTX
PageSpeed Optimization
PDF
CMS Tools for Developers- Owen Harris
PPTX
10 Tips for Optimising WordPress
PDF
Intro to sbt-web
PPTX
Single-page applications and Grails
PDF
Liz Quilty – Security, Scaling & High End Hosting for WordPress sites
PPTX
PPT
Making your application realtime with signal r
PPT
Asp.net performance secrets
Packing for the Web with Webpack
Introduction To Gatsbyjs
Front-End Performance Optimization in WordPress
WebGL의 무궁무진한 가능성
Bundling your front-end with Webpack
Node.js + NoSQL
Production optimization with React and Webpack
Thu 1500 lacoul_shamod_color
Let's talk real-world private cloud implementation!
Web development using nodejs
Extensions.pdf
PageSpeed Optimization
CMS Tools for Developers- Owen Harris
10 Tips for Optimising WordPress
Intro to sbt-web
Single-page applications and Grails
Liz Quilty – Security, Scaling & High End Hosting for WordPress sites
Making your application realtime with signal r
Asp.net performance secrets
Ad

Similar to Design for performance (20)

PPT
performance.ppt
PPTX
The Need for Speed - SMX Sydney 2013
PDF
implement lighthouse-ci with your web development workflow
PPTX
Building a website without a webserver on Azure
PDF
Core Web Vitals Optimization for any website, especially WordPress
PPTX
JavaScript front end performance optimizations
PPTX
10 Tips to make your Website lightning-fast - SMX Stockholm 2012
PDF
Coding the UI
PDF
Coding Ui
PPTX
Building high performing web pages
PPT
Web performance tuning
PDF
Building Performance - ein Frontend-Build-Prozess für Java mit Maven
PDF
Build Better Responsive websites. Hrvoje Jurišić
PDF
NYC WebPerf Meetup Feb 2020 - Measuring the Adoption of Web Performance Techn...
PDF
The Need for Speed (5 Performance Optimization Tipps) - brightonSEO 2014
PPTX
Presentation Tier optimizations
PPTX
Analysis of Google Page Speed Insight
PDF
Performance Test Analysis- Hotels
PDF
Hardware Acceleration in WebKit
PPTX
Backbone.js
performance.ppt
The Need for Speed - SMX Sydney 2013
implement lighthouse-ci with your web development workflow
Building a website without a webserver on Azure
Core Web Vitals Optimization for any website, especially WordPress
JavaScript front end performance optimizations
10 Tips to make your Website lightning-fast - SMX Stockholm 2012
Coding the UI
Coding Ui
Building high performing web pages
Web performance tuning
Building Performance - ein Frontend-Build-Prozess für Java mit Maven
Build Better Responsive websites. Hrvoje Jurišić
NYC WebPerf Meetup Feb 2020 - Measuring the Adoption of Web Performance Techn...
The Need for Speed (5 Performance Optimization Tipps) - brightonSEO 2014
Presentation Tier optimizations
Analysis of Google Page Speed Insight
Performance Test Analysis- Hotels
Hardware Acceleration in WebKit
Backbone.js
Ad

More from Warm Gun: Designing Happiness conference (6)

PPT
Designing for Search: Finders Keepers by Tom Chi, Google
PPTX
Warm Gun: Designing for Competing Interests: Buyers, and Sellers, and Designe...
PPT
Warm Gun: Designing for Conversion: Converting Their Pants Off!
PPTX
Warm Gun: Designing with Data: Usability Testing & the UI
PPTX
Warm Gun: Evolution & The Central 6 Traits that Make Consumers Tick (and CLICK!)
Designing for Search: Finders Keepers by Tom Chi, Google
Warm Gun: Designing for Competing Interests: Buyers, and Sellers, and Designe...
Warm Gun: Designing for Conversion: Converting Their Pants Off!
Warm Gun: Designing with Data: Usability Testing & the UI
Warm Gun: Evolution & The Central 6 Traits that Make Consumers Tick (and CLICK!)

Recently uploaded (20)

PPTX
Principles of Marketing, Industrial, Consumers,
PPTX
Probability Distribution, binomial distribution, poisson distribution
PDF
DOC-20250806-WA0002._20250806_112011_0000.pdf
PDF
20250805_A. Stotz All Weather Strategy - Performance review July 2025.pdf
PPT
Chapter four Project-Preparation material
PPTX
job Avenue by vinith.pptxvnbvnvnvbnvbnbmnbmbh
PPTX
New Microsoft PowerPoint Presentation - Copy.pptx
DOCX
Euro SEO Services 1st 3 General Updates.docx
PDF
BsN 7th Sem Course GridNNNNNNNN CCN.pdf
PDF
COST SHEET- Tender and Quotation unit 2.pdf
PPT
Data mining for business intelligence ch04 sharda
PDF
MSPs in 10 Words - Created by US MSP Network
PDF
Reconciliation AND MEMORANDUM RECONCILATION
PPTX
Belch_12e_PPT_Ch18_Accessible_university.pptx
PDF
kom-180-proposal-for-a-directive-amending-directive-2014-45-eu-and-directive-...
PPTX
Lecture (1)-Introduction.pptx business communication
PPTX
Amazon (Business Studies) management studies
PDF
How to Get Business Funding for Small Business Fast
PDF
Stem Cell Market Report | Trends, Growth & Forecast 2025-2034
DOCX
unit 1 COST ACCOUNTING AND COST SHEET
Principles of Marketing, Industrial, Consumers,
Probability Distribution, binomial distribution, poisson distribution
DOC-20250806-WA0002._20250806_112011_0000.pdf
20250805_A. Stotz All Weather Strategy - Performance review July 2025.pdf
Chapter four Project-Preparation material
job Avenue by vinith.pptxvnbvnvnvbnvbnbmnbmbh
New Microsoft PowerPoint Presentation - Copy.pptx
Euro SEO Services 1st 3 General Updates.docx
BsN 7th Sem Course GridNNNNNNNN CCN.pdf
COST SHEET- Tender and Quotation unit 2.pdf
Data mining for business intelligence ch04 sharda
MSPs in 10 Words - Created by US MSP Network
Reconciliation AND MEMORANDUM RECONCILATION
Belch_12e_PPT_Ch18_Accessible_university.pptx
kom-180-proposal-for-a-directive-amending-directive-2014-45-eu-and-directive-...
Lecture (1)-Introduction.pptx business communication
Amazon (Business Studies) management studies
How to Get Business Funding for Small Business Fast
Stem Cell Market Report | Trends, Growth & Forecast 2025-2034
unit 1 COST ACCOUNTING AND COST SHEET

Editor's Notes

  • #3: Performance KILLS: 400 ms -&gt; 1% reduction in search volume Reduction persisted even after the latency was removed. Review of the google data, other data that shows user adoption &amp; loyalty effected by performance. Distribution: search engines care about it now Partners: cut-offs when you are on other platforms (Facebook, linkedin)
  • #4: 90% of time is spent waiting for css, js, image, flash files in a page to download. (&gt;&gt;&gt;IMG THAT SHOWS THIS&lt;&lt;&lt;) It&apos;s *theoretically* easier to fix client-side performance than server-side performance. Classic 80/20 rule … 80% of the output from 20% of the input. So this is where you want to focus. 100% left-brain anayltical, using straightforward rules of thumb. But requires whole team (web designers , front end devs, server devs, and ops) to work together to get right.
  • #5: Series of 10 recommendations from Steve Souters that are baked into YSlow tool. Brilliant way to get your ideas across. You don&apos;t even really need to read the book, just using the tool will push you in the right direction. I&apos;m only going to talk about the top 3, because they&apos;re listed in decreasing importance.
  • #6: 1) REDUCE HTTP REQUESTS
  • #7: 1) REDUCE HTTP REQUESTS
  • #8: - Merge images into one, show parts of the image using css. //SHOW SPRITE IMAGE
  • #10: Unfortunately, a lot of social sites are fibered here. Navigational images can easily be sprited into a single image. But a bunch of faces or a bunch of thumbnails of related content can&apos;t. Dave McClure &amp;quot;Faces&amp;quot; image.
  • #11: The FACES are the problem
  • #12: FACES are a problem in ads as well. Ad images can occasionally be super-abusive (show post-nup show ad). Very difficult to track down if coming through an ad network. Ads can be abusive as well. Ad servers can stuff LOTS of random things into your page. Need to spot - check, remove ad networks who stuff with junk. Constance vigilance is required, only work with a couple ad networks that you really trust. If you think about what you&apos;re letting someone do by serving their own ad code, they can basically do whatever they want.
  • #13: - Concatinate CSS files into one file (combined.css)- Concatinate JS files into one file (combined.js)
  • #14: VIRALITY and ADS both come at a cost.
  • #15: CDNs used to be very inapproachable for pre-funding startups. Now with Amazon CloudFront anyone can get CDN, and you *really* should.Things to be aware of: - Necessary for economics as well as performance. I can&apos;t share the prices we pay for bandwidth, but they are much less than amazon. So for a company that&apos;s using cloud infrastructure, a CDN is a cost-saving measure. - Use cloudfront or something else until your costs start to actually rise. - If you&apos;re not used to negotiating this is a much better environment to practice than when you&apos;re dealing with VCs. It&apos;s all about BATNA. Play vendors off against each other and watch the price drop. - There&apos;s 2 ways to pay for CDN: 95/5 and per-GB. 95/5 is too confusing, per-GB will let you understand and predict your costs a lot better - CDNs always want a &amp;quot;commit&amp;quot; of how much you will consume per month/year. Shoot for committing about 1/2 of what you&apos;re currently consuming. Lots of people have been burned by CDN vendros. - Integrations take longer than you think they will … a lot goes on behind the scenes. Our switch to Akamai took about 10 weeks, most of the time was on Akamai&apos;s side, tuning their network for our content- MEASURE USING EXTERNAL SERVICE NAME
  • #16: This is basically an extension of rule 1, &amp;quot;make fewer http requests&amp;quot;. If you serve an asset locally, then you don&apos;t make a request.The difference between an asset being cached on the browser and being fetched via a CDN is like the difference between something being in memory vs on disk. It&apos;s HUGE. So don&apos;t do more work then you have to. So how do you stop the browser from requesting an image that it already has?When you serve up the image, set the following header: Cache-Control: max-age to a really high number. What this does is tell the browser that if it has had the resource specified by the given url for less that &amp;quot;a really big number of seconds&amp;quot;, then don&apos;t bother fetching it. Because it probably hasn&apos;t changed.
  • #18: So what about when you want to change that resource? You&apos;re screwed, right? Well not really. The trick is to add a bogus parameter to the request. For example, you could link to /images/my_sprited_image?1123454. On a deployment that includes a change to that resource, increment the version number. New requests will go to /images/my_sprited_image?65432213. The date is the last time the file was edited. The second page load will serve the sprited image, merged css, and merged js from local disk, so it will be much faster. The faces and thumbnails will kind of add up over time, so that very frequent users will see the most benefit. For example, if you browse Facebook every day, then over time most of your friends faces will be served from disk. Once again, the other resources are out of your control: you can&apos;t effect the settings they use on their servers. ;-&lt;
  • #19: Basic problem anytime you embed anything from somebody else. They won’t be able to reliably change the link if they want to change the resource. As a result, they are unlikely to set a far-future expires header. This is why it’s a good idea to be very cautious about using third-party services for anything. Of course, with ads you don’t have a choice. Advertisers insist on running their own ad servers so they can independently verify that you are delivering the impressions you charge them for. Main culprit: ADS
  • #20: Notice what a problem analytics is for external images. This is because, like ads, analytics only works if it is triggered on each page load. So it’s not possible to cache the images google and quantcast load and still perform the function that they are built for. Main culprit: ANALYTICS
  • #22: Not as important as client-side performance. There&apos;s a good chance you think too much about this already!
  • #23: Profile your code: build measurement directly into your app. Use tools like newrelic to understand performance.Don&apos;t work on the thing that isn&apos;t the bottleneck right now. Remember, premature optimization is the root of all evil. At any one time, there&apos;s probably at least one thing you&apos;re doing that&apos;s REALLY STUPID. Focus on finding that and fixing that.Measure and chart the web server performance as well &gt;&gt;SCREENSHOTS OF OPS PAGES&lt;&lt;&lt;Measure the performance of the page from outside as well. There&apos;s lots of services like Gomez and ____ to do this, we use WebSitePulse to do this because they&apos;re super-cheap and measuring how long it takes a page to load is not rocket science.
  • #24: 1) CACHE THE HELL OUT OF EVERYTHING---Making web systems fast and scalable requires multiple layers of cacheWe already talked about two layers of cache, the browser cache and the CDN. On the server-side, there are two other caching layers that are releventA) MemCached (for objects). Obvious way to improve scalability and improve performance.Profile your use of memcached. We&apos;ve found pages making hundreds of sequential fetches. In general you want to to cache at a course-grained level. Sets of objects rather than individual objects.//SHOW LIST OF MEMCACHED CALLS//SHOW CHART OF SPEEDUP AFTER WE REDUCED THEM
  • #25: B) Varnish or another reverse proxy cache (for static pages)Ruby and other interpreted languages are slow.Once you generate the html, you should save it for the next time and serve it up from RAM instead of executing any logic.// SHOW CHART OF SPEEDUP FROM IMPLEMENTING VARNISH Cache invalidation is one of the harder software engineering problems to get right.Users don&apos;t have caching as part of their mental model. If they do an action and then don&apos;t see the result, they will freak out.
  • #27: DO AS LITTLE WORK AS POSSIBLE AT RENDER TIMEPre-calculate things that are complicated (related content, leaderboards). Don&apos;t try to do it at render time. Dispatch work to be done later into a queue or database. Don&apos;t try to do it at render time.
  • #28: Prefetching
  • #29: -Don&apos;t try to do too much at once. Focus on the top YSlow rule, try to get an A or a B in that. Once you hit diminishing returns move to the next one down the list. Otherwise you risk doing a lot of work without moving the needle much. We made that blunder. -Performance is uniquely cross-functional. If your team is divided up into typical departments, like backend, frontend, operations, design, then you will NOT be able to move forward. You need to be able to have a designer work with a backend programmer and an ops person to troubleshoot performance problems.