Web Peformance Factors

October 27, 2008 – 2:28 am by coachwei | Category WebDev |

Every web application requires satisfactory performance in order to be functional. Every web application has its own context that different factors influence performance differently. Since the beginning of the web, there have been many performance tuning endeavors responding to what the context calls for.

A good metric to gauge web performance is page loading time. Page loading time refers to the time from when browser issues the page URL request to the moment when the page is loaded, rendered and ready for user interaction. Page loading time is determined by three factors:

  • Server processing time: the amount of time that the server takes to process a page request and deliver the response to the client;
  • Network transfer time: The amount of time that it takes to transfer the content from one end point to the other end point;
  • Front end processing time: the amount of time that the client (browser) takes to process the content it received, including parsing, loading additional resources when required and rendering.

Given that web applications are distributed across web server, network and web browser, all of the three factors play a role in performance. However, the relative importance of each factor is different, which is largely related to the web architecture.

Historically, the web architecture was server-centric. All (or almost all) intelligence stayed on the server side and there was very little intelligence on the client side. The browser requires very little “intelligence” besides acting as a “dumb display terminal”. Further, web content were mostly plain HTML pages that consume very little network resources to transfer. In this model, the performance bottleneck was typically on the server side and server processing time was the biggest performance factor. As a result, most of the earlier web performance optimization efforts focused optimizing server side processing, such as using more powerful servers, database tuning, optimizing server side logic, etc.

As web pages grew richer, the number of external objects, such as graphical images, included in web pages started to grow. Because external objects require network round trips, the impact of network transfer started to become more visible, especially when transferring content internationally. HTTP caching was adopted to alleviate the network impact. Further, content delivery services (CDN), which are mostly based on HTTP caching techniques, grew into an industry dedicated at improving network performance for delivering web content.

Over the last several years, we witnessed the so-called “Web 2.0” evolution. Driven by a need to deliver a richer user experience, the web’s architecture has shifted away from being 100% server-centric into an architecture that leverages both client side and server side processing power. Putting data and intelligence to where the user is at significantly improves user experience by reducing server round trips. As a result, in today’s web 2.0 environment, the client side is taking on more data and computation. According to Reference 1, from 1995 to 2008, the size of an average web page has increased 22 times, and the number of external objects per page has grown 21.7 times. From 2003 to 2008, the average web page grew from 93.7K to over 312K (233%) and the number of external objects in the average web page nearly doubled from 25.7 to 49.9 external objects per page. Because JavaScript is the only supported way to implement client side intelligence, today’s web applications tend to employ a significant amount of JavaScript code.

Consequentially, this Web 2.0 evolution significantly changed the comparative importance of web performance factors. For the first time, front end processing time is becoming the biggest factor in web performance while server side processing time and network transfer time are both becoming secondary.

Figure 1: The Changing Relative Importance of Performance Factors with the Evolution of the Web

More specifically, among front end processing, client side JavaScript code is becoming one of the top influencers on the overall performance due to the increasingly dependency of web applications on JavaScript.

Post a Comment