Welcome!

Web 2.0 Authors: Pat Romanski, Esmeralda Swartz, Kevin Benedict, Alex Forbes, Tim Hinds

Related Topics: AJAX & REA, Java, XML, .NET, Web 2.0, Big Data Journal

AJAX & REA: Article

Analyzing Web Site Performance Made Easy

AJAX Edition 4.3 supporting FF 25 & IE 11

Compuware APM is pleased to announce the latest update to our free Compuware/dynaTrace AJAX Edition which now also supports Firefox 3.6 until version 25 and also Internet Explorer 6 through 10 + Experimental IE11 Support. Download it for free from our AJAX Edition Download page.

To show new users the capabilities of this free tool we want to keep the tradition of analyzing some websites to show ease of use and usefulness of the tool. As it is online shopping season I picked a couple of web shops and highlight the key optimization tips that the Performance Report provides.

Optimization #1: Spriting of 100 Flag Images - Reduce Roundtrips by 99%
Lots of shopping sites are international and prompt the user to confirm the country that they detected based on the current geo location. Here is one candidate that provides a region selection dialog listing the names of countries grouped by continent - preselecting the one they think I come from.

The following screenshot is from the Network View that shows that they download 100 national flags as individual images. The best practice here is to merge them into a Sprite which reduces the round trips by 99%:

These images should be put in a sprite. This reduces the number of images by 99 as all can be put in one sprite

Optimization #2: Heavy DOM Manipulations through JavaScript
A lot of websites use JavaScript to dynamically modify DOM elements to e.g., replace links with links that can be tracked for web analytics purposes. Others - like the one shown below - use JavaScript to replace <span> objects of a specific CSS class with a <a>. This is not necessarily bad - but in this case they have 759 of these span objects on the homepage alone that need to be removed and new objects need to be added. Using the Compuware/dynaTrace AJAX Edition on the different browsers (from IE6 to the latest version of FireFox) shows slow JavaScript performance on some of the older browsers. Even on Internet Explorer 10 processing these span objects takes 1.1s on my rather new and fast laptop. To optimize this one needs to ask the question whether it might be better to either a) cut down on the number of span objects or b) already deliver the HTML with links instead of these spans:

Modifying large number of DOM elements on a page before the page is actually loaded impacts page load time and blocks the user to interact with the site

Optimization #3: "Overloaded" Pages and Non Optimized Resources

Many websites are overloaded with too much information that is not important for the end user. Then they also add lots of third-party content which may or may not be important to end users as well, e.g., Facebook-like buttons.

Very often we also see content such as HTML, JS or CSS is delivered without being optimized for size. The best practice is to remove empty lines, comments or even minify JavaScript code to reduce the size of the downloaded content.

The following case shows slow page load impacted by two major factors:

  1. Latency and Bandwidth: I downloaded the page from Europe whereas the website is probably hosted in the US
  2. Content Size: the HTML for a single product page is 150kb. Not that huge - but - a majority of that content was HTML Comments and not content important for the end user

The first screenshot shows the dynaTrace AJAX Edition Timeline View representation. It shows the extra-long download of the initial HTML response:

Overloaded pages with too many images, JavaScript, CSS files and lots of third-party content often results in very bad page load time

My geo location definitely had a major impact on this. Interesting enough the content from the third-party domains delivered their content much faster - probably because they (Google, Facebook & Co) use CDNs that delivers content from European servers.

A closer look at the HTML or JavaScript shows potential of optimization. The HTML contains lots of comments that should be removed. To reduce the size on the one side but also eliminate a security risk by not exposing developer names or internal code references to the public world:

There are many tools out there that can automatically remove comments and compress HTML, CSS and JavaScript files

To read more about optimizations that are new in the latest edition - click here

Engage with the AJAX Edition Community
If you have any questions on the new AJAX Edition please use the forums available on our Community Portal. If you want to share your own analysis results leave a note on the forum as well and we can work on a joint blog post.

The Compuware/dynaTrace AJAX Edition Team wishes you Happy Holidays and a Good Start into 2014!

More Stories By Andreas Grabner

Andreas has over a decade of experience as an architect and developer, and currently works as a senior performance architect and technology strategist for dynaTrace Software, where he influences product strategy and works closely with customers in implementing performance management solutions across the application life cycle. He is a regular speaker at software conferences, writes for a number of technology publications, and blogs at http://blog.dynatrace.com

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.