FRONT END OPTIMIZATION: TRADE-OFFS YOU'RE FORCED TO MAKE BY KYLE GENTRY.

Slides:



Advertisements
Similar presentations
CHAPTER 15 WEBPAGE OPTIMIZATION. LEARNING OBJECTIVES How to test your web-page performance How browser and server interactions impact performance What.
Advertisements

M2 – Explain the tools and techniques used in the creation of an interactive website. By Arturas Vitkovskij.
Unit 3 Day 4 FOCS – Web Design. No Journal Entry.
Client side performance in Web based Banking applications Divakar Prabhu Infosys Limited (NASDAQ: INFY)
Amazon CloudFront An introductory discussion. What is Amazon CloudFront? 5/31/20122© e-Zest Solutions Ltd. Amazon CloudFront is a web service for content.
Will Law | Chief Media Architect | Akamai Optimizing the Black Box of HTML.
1 Chapter 12 Working With Access 2000 on the Internet.
Web Accessibility Tests Using the Firefox Browser ACCESS to Postsecondary Education through Universal Design for Learning.
Analysis and Performance Information Systems 337 Prof. Harry Plantinga.
Performance Comparison of Congested HTTP/2 Links Brian Card, CS /7/
Microsoft ® Official Course Developing Optimized Internet Sites Microsoft SharePoint 2013 SharePoint Practice.
Chapter 1 Understanding the Web Design Environment
High Performance Websites (Based on Steve Souder’s lecture) By Bhoomi Patel.
Putting the Network to Work
Responsive Wed Design : An Emerging Technology Archana Jain.
Mark Phillip markphillip.com 200s, 304s, Expires Headers, HTTP Compression, And You.
JavaScript & Metaperformance Douglas Crockford Yahoo! Inc.
Performance, SEO, Accessibility Ivan Zhekov Telerik Corporation
Chapter 1 Variables in the Web Design Environment
HTML and Designing Web Pages. u At its creation, the web was all about –Web pages were clumsily assembled –Web sites were accumulations of hyperlinked.
Reading Data in Web Pages tMyn1 Reading Data in Web Pages A very common application of PHP is to have an HTML form gather information from a website's.
Advanced Web 2012 Lecture 4 Sean Costain PHP Sean Costain 2012 What is PHP? PHP is a widely-used general-purpose scripting language that is especially.
DNN Performance & Scalability Planning, Evaluating & Improving : Part 2.
Designing for the Unknown. Challenges of Web Design As frustrating as it may be – there is no guarantee that people will see/experience your web pages.
Performance of Web Applications Introduction One of the success-critical quality characteristics of Web applications is system performance. What.
Tutorial 1: Getting Started with Adobe Dreamweaver CS4.
User Side Factors. Download Speed Download speed from a user’s side, is how long it takes a webpage to load, once requested. The measurement for time.
Advanced Web Forms with Databases Programming Right from the Start with Visual Basic.NET 1/e 13.
10 Adding Interactivity to a Web Site Section 10.1 Define scripting Summarize interactivity design guidelines Identify scripting languages Compare common.
Extending HTML CPSC 120 Principles of Computer Science April 9, 2012.
 Whether using paper forms or forms on the web, forms are used for gathering information. User enter information into designated areas, or fields. Forms.
Optimizing Web Sites Lee Sutherland. The Key Point In IA, ‘optimization’ refers to minimizing complexity to achieve faster download times Speed is an.
Web Performance and key business metrics Part II: More Findings from the Front Line of Web Acceleration.
Computing Infrastructure for Large Ecommerce Systems -- based on material written by Jacob Lindeman.
Using the Right Method to Collect Information IW233 Amanda Murphy.
Session: 1. © Aptech Ltd. 2Introduction to the Web / Session 1  Explain the evolution of HTML  Explain the page structure used by HTML  List the drawbacks.
CSS BEST PRACTICES.
CHAPTER 5 Working with Data Tables and Inline Frames.
Empirical Quantification of Opportunities for Content Adaptation in Web Servers Michael Gopshtein and Dror Feitelson School of Engineering and Computer.
PERFORMANCE ENHANCEMENT IN ASP.NET By Hassan Tariq Session #1.
Putting Performance Best Practices Together to Create the Perfect SPA Chris Love2Dev.com.
Elements of Website Design. Homepage ● first page of the website ● website title ● general introduction ● authors or creators information ● date updated.
Restricted © Siemens AG All rights reserved A Developer’s Insights Into Performance Optimizations for Mobile Web Apps CT DC AA EM LP2 | June 2015.
LESSON 15 – UNIT 0 ADAPTING YOUR WEB SITE FOR MOBILE DEVICES.
1 Minification JavaScript & CSS. 2 Minification Removing 0 Whitespace 0 Line Breaks 0 Comments 0 Shrink Variables 0 Optimize Code.
Web Cache. What is Cache? Cache is the storing of data temporarily to improve performance. Cache exist in a variety of areas such as your CPU, Hard Disk.
Introduction. Internet Worldwide collection of computers and computer networks that link people to businesses, governmental agencies, educational institutions,
Intro to Web Performance Ten Ways to a Faster Website Presented by: Sheila Eaton and Mohammad Durrani TechKnowFile, University of Toronto, May 5, 2016.
WHAT'S THE DIFFERENCE BETWEEN A WEB APPLICATION STREAMING NETWORK AND A CDN? INSTART LOGIC.
Whole Page Performance Leeann Bent and Geoffrey M. Voelker University of California, San Diego.
THE FUTURE IS HERE: APPLICATION- AWARE CACHING BY ASHOK ANAND.
MICROSOFT AJAX CDN (CONTENT DELIVERY NETWORK) Make Your ASP.NET site faster to retrieve.
IF STARBUCKS USED INSTART LOGIC, THEY WOULD HAVE A FASTER RESPONSIVE WEBSITE BY PETER BLUM.
FASTER PERFORMANCE FOR DYNAMIC HTML PAGES BY SHARAD JAISWAL.
111 State Management Beginning ASP.NET in C# and VB Chapter 4 Pages
Enhance Your Page Load Speed And Improve Traffic.
FASTER WEB PERFORMANCE USING VIRTUALIZATION IN THE BROWSER BY MEHRDAD RESHADI.
Technology for Mobile Network Operators Business Case: Improve Overall Service Quality and Customer Experience While Dramatically Lowering Carrier Costs.
WHAT'S NEW IN HTTP/2 BY DAWN PARZYCH. The front end optimization (FEO) movement was a result of the inefficiencies of HTTP/1.1. The availability of.
Business Case: Improve Overall Service Quality and Customer Experience
Benchmark Methodology - Update
Cascading Style Sheets
Whether you decide to use hidden frames or XMLHttp, there are several things you'll need to consider when building an Ajax application. Expanding the role.
Tips for Website Speed Optimization
Hints and tips for faster web apps
jQuery The Easy JavaScript Nikolay Chochev Technical Trainer
Web Design Designing for the Unknown.
Benchmark Methodology - Update
Yale Digital Conference 2019
Presentation transcript:

FRONT END OPTIMIZATION: TRADE-OFFS YOU'RE FORCED TO MAKE BY KYLE GENTRY

You can’t have it all – so the saying goes – and when it comes to application optimization, that is typically true. There are trade-offs that are made when deciding what optimization to deploy. Three of the main aspects when optimizing an application to consider are: 1.What performance impact an optimization will have. Is the optimization going to help the majority of customers, the majority of content, and will it cause a double-digit performance improvement? 2.How reliable the optimization is. Will implementing a new technique cause an application to break? Does the optimization cause some pages to load faster and other pages to load slower, or have first-time visits improved but repeat visits become slower? 3.How much time and effort is required for implementation. Will you have to spend time creating a whitelist or blacklist to ensure the site continues to function for all users? What happens when you change your site? Do you have to reconfigure all of the optimizations? When it comes to optimization techniques, the list of what can be done is constantly growing, and not each technique has the same ROI.

The grid above attempts to chart some of the most common optimizations available through FEO- and server-based along three variables. The y-axis is the measurement of the performance impact, the x-axis is the measurement of the reliability of the implementation, and the size of the dot reflects the amount of time required for implementation (the larger the dot, the more time-consuming).

These features have minimal performance impact and implementing them can result in adverse consequences. The goal of in-lining and concatenation of resources is to reduce the number of round trips required to load a page, as generally the more round trips required, the longer it takes to load a page. But these techniques only apply to first-time visitors, or those with an empty cache. The bigger downside of these techniques is that they can “break” caching for repeat visitors or a subsequent page views in a browsing session. Concatenation is the process of combining multiple JavaScripts (JS) or Cascading Style Sheets (CSS) into a single file. With concatenation, each page may have a different combination of JavaScript files. This means that files that were downloaded need to be downloaded multiple times and can’t be served from cache. The other problem with concatenation is that combining all resources into a single file may not always improve performance. The example below shows how concatenating the JS and CSS actually made performance worse. Figure 1 shows the application prior to concatenation, and Figure 2 shows performance after concatenation. LOW PERFORMANCE, LOW RELIABILITY

Figure 1: Prior to concatenation

Figure 2: After concatenation

Concatenation reduced the number of round trips from 48 down to 21, which is a large reduction in the number of round trips. The problem is that the JavaScript file is now 600 Kb and blocks other objects from downloading – resulting in a higher average page load time and a longer time to start render. Having the content split across multiple connections results in a better experience for users. Similarly, in-lining resources can also negatively impact caching. In-lining takes external files and embeds them in the HTML to eliminate the round trip. HTML is typically not cached by a browser and is retrieved for each request, resulting in repeat viewers getting worse performance after in-lining is implemented. Many people will choose to only in-line smaller files, but this adds layers of complexity to determining the appropriate threshold and the creation of the whitelist. With increased adoption of HTTP/2, both of these techniques will be deprecated, as concurrency is a core feature of the HTTP/2 specification. Spending time to implement techniques that will not be needed in an HTTP/2 world does not seem worth the effort, especially given the low performance impact.concurrency is a core feature of the HTTP/2 specification HIGH PERFORMANCE, LOW RELIABILITY These optimizations have a higher performance impact but still have challenges in terms of reliability. While all of these optimizations attempt to improve the performance of images, they all go about it in different ways. Improving the performance of images often results in high performance gains, as they make up such a large percentage of page weight. The time required for implementation may be worth the performance gains. One thing to remember with each of these is the ongoing care and feeding that is required; any web site change means re-testing and potentially rewriting code to execute correctly.

Image sprites were one of the first optimizations on the scene. The goal was to reduce the number of round trips by combining all the images into a single file and use CSS pointers to tell the browser which part of the image to display. Having to create a new sprite and update the CSS when images change on your application reduces the reliability of images on your site changing frequently. Prefetching images is anticipating what a user will click on next and populating the browser's cache with that content. As images are highly cacheable, they are frequently pre-fetched. Requesting images before a user needs them can speed up performance if the prediction was correct. Predicting human behavior is not easy; you may end up sending content to the user that wasn’t needed, wasting precious bandwidth. It is difficult to reliably predict what a user will do next after viewing a web page. Lazy-loading of images is the opposite of pre-fetching content. Instead of loading images on the page, the browser defers loading of the resource until a later time. This technique is used to first populate only the content that appears “above the fold” – images that are outside of the viewport are not loaded immediately. If a user navigates away from a page prior to the image loading, this technique can also serve to reduce overall server load. Predicting what is in the viewport, though, is not always successful, resulting in images that should load not being visible.

Optimizations in this category provide lower performance benefits but are generally considered safe. Reasons for lower performance benefits are that the optimizations only apply to a small subset of users or to a small number of resources. Domain sharding was popular back in the day when browsers only opened 2 connections per domain; as browsers have evolved, they now support more than 6 connections per domain. For those still forced to use IE 6, domain sharding is still an excellent solution to performance issues. As with other techniques, HTTP/2 will eliminate the effectiveness of domain sharding. Minification complements compression, making text files even smaller by eliminating whitespace and comments, as these aren’t needed by the browser to render a page. Minification can provide small improvements for already-compressed content and greater compression for users who can’t receive compressed content. With a number of tools out there to minify content, the time requirements are relatively small, but the reliability is high. Implementing minification makes sense if you have already optimized everything else on your site. LOW PERFORMANCE, HIGH RELIABILITY

Figure 2: After minification Revisiting the earlier concatenation example, we can see the benefits that minification can provide. While concatenation made the performance worse, minifying the content reduces page load time by 12% from the origin and 16.8% from the concatenated version, as the 600-Kb JS file is reduced to 428 Kb.

This last category is where you want to focus your attention, as you get the most bang for your buck – the greatest performance gains and the lowest chance of breaking your application. Caching and compression are two very easy ways to improve performance and can generally be configured easily at the server or application delivery controller (ADC). Caching can also be extended a step further by using a content delivery network (CDN) to cache and serve content for geographically- distributed locations. Many FEO techniques focus on improving the performance of first-time visitors, as the hope is that on a repeat visit, content will come from cache. The challenge is that not all caches are created equal. Image optimization provides tremendous gains to web sites but requires a large time commitment to ensure that it is done correctly. Image optimization includes both lossless and lossy optimizations, such as converting an image from one format to another, stripping metadata, and reducing image quality. When done incorrectly, these can be highly unreliable and result in a broken site. Taking the time to optimize images correctly is required to get the high performance impact and high reliability for your application. HIGH PERFORMANCE, HIGH RELIABILITY

Optimizing applications seems a lot like a science experiment. You form a hypothesis that doing x will improve performance. You make the changes, realize something went wrong, investigate what went wrong, fix the problem, and test again. You may or may not get the performance improvements you were hoping for, and if you had estimated the project would take a couple of days and ended up taking weeks, was it worth it? If you are short on time, focus on the high-performance and high- reliability items with short times to implement, like caching and compression. Or stay tuned for the next blog post on how Instart Logic took a different approach to optimize application delivery by harnessing the power of machine learning. WHERE TO START?

Visit our Blog for more