Andreas Grabner About the Author

Andreas Grabner has been helping companies improve their application performance for 15+ years. He is a regular contributor within Web Performance and DevOps communities and a prolific speaker at user groups and conferences around the world. Reach him at @grabnerandi

dynaTrace AJAX Edition 3.0 released – FREE Next Generation Browser Diagnostics – PART I


With its latest release, dynaTrace updates its Product Suite for Deep Dive, Automated Cross-Browser Web Performance Optimization with two products:

  • dynaTrace AJAX Edition 3.0 is the free standalone tool that has been downloaded by 30k+ users so far supporting both Firefox (3.6, 4.0) and Internet Explorer (6, 7 & 8 )
  • dynaTrace Development Team Edition is the Premium Upgrade and provides extended automation, end-to-end performance and automated regression analysis for modern Web 2.0 Applications

In this first part of the series I focus on the capabilities that support web developers and testers on their local workstation when analyzing performance or problems in Internet Explorer and Firefox. A second part covers the benefits of the Premium Upgrade for Agile Development Teams when automating performance and regression analysis.

dynaTrace AJAX Edition 3.0 – Capabilities that can save your day

As a Web Developer and Tester of Web Applications it is challenging to keep up with verifying that the latest changes to your web site work well and don’t impact web page performance across different browsers. dynaTrace AJAX Edition 3.0 comes with the features and capabilities you need to make your day-to-day activity much easier. The steps to get started are easy – just follow the instructions on the Welcome Screen:

dynaTrace AJAX Edition 3 Welcome Screen - 3 easy steps to follow: Trace, Browse, Analyze

dynaTrace AJAX Edition 3 Welcome Screen – 3 easy steps to follow: Trace, Browse, Analyze

We also provide several videos that walk you through the individual features and capabilities: dynaTrace AJAX Edition 3 Tutorial Videos

Improve Page Load Times

As we’ve come to understand the actual impact of Page Load Time on end user behavior (confirmed by studies from Microsoft, Yahoo, Google and Shopzilla), accelerating Page Load Time has become a top goal for every web site. Following Best Practices from Yahoo, Google and dynaTrace on how to reduce network roundtrips, optimize browser caching and speed up JavaScript execution can significantly improve Page Load Time. dynaTrace AJAX Edition provides a Performance Report that analyzes every visited page based on these known Best Practices. This Performance Report provides different sections and gives recommendations on how to improve page load time.

Particularly in Web 2.0 Applications that leverage JavaScript and DOM Manipulations, it is common for JavaScript Execution to significantly contribute to actual Page Load Time. The dynaTrace Performance Report lists problematic JavaScript handlers and functions that have a significant performance impact on the Page Load Time. Optimizing client side code can improve Page Load Times significantly. The following screenshot shows that the Yahoo News Home Page uses a very inefficient method to lookup DOM elements by class name. The Call Trace and the Source Code view on the right show who makes these inefficient calls, making it easy to start optimizing the code:

Performance Report highlights JavaScript Execution that slows down Page Load Times

Performance Report highlights JavaScript Execution that slows down Page Load Times

The other tabs in the Performance Report focus on optimizing Browser Caching, reducing Network Roundtrips and optimizing Server-Side request times. Following the guidelines in every tab of the report enable you to focus on the things that will really accelerate your page load times.

Identify Cross-Browser Issues

Firefox is the browser of choice for most web developers. The lack of tooling support for earlier versions of Internet Explorer caused many developers and also testers to do their work exclusively on Firefox. This resulted in web sites that worked well in Firefox but had issues on other browsers – especially Internet Explorer. dynaTrace AJAX Edition solves this problem by providing a single tool that captures the same in-depth browser diagnostics data on Internet Explorer 6, 7 & 8 and Firefox 3.6 and 4 (Support for Internet Explorer 9 will follow soon). Having one tool that provides insight into JavaScript execution, DOM manipulations, Rendering activities and Network behavior on these browsers makes it easy to identify cross-browser problems and enables developers to optimize their code.

The following screenshot shows the performance report of the same pages for both Firefox and Internet Explorer. The high-level analysis shows the difference in load times, as well as certain characteristics such as number of network requests, redirects or cached vs. un-cached resources.

Yahoo News seems to be optimized for Internet Explorer with additional roundtrips, redirects and uncached resources causing problems in Firefox

Yahoo News seems to be optimized for Internet Explorer with additional roundtrips, redirects and uncached resources causing problems in Firefox

Not only can we compare high-level performance metrics like those shown in the screenshot above. We can also compare the actual Network Requests, Caching Behavior and JavaScript execution on each browser and browser version. This helps us discover whether certain settings – such as Cache-Control – have not been set for a certain browser or if the included JavaScript libraries work correctly across browsers.

Optimize Page Rendering

Optimizing Page Load Time is only one aspect of accelerating web site performance. The most important key performance indicator is the First Impression Time. That is the time it takes from when a user enters a URL or clicks on a link until that user actually sees a visual response on the screen. In order to optimize Page Rendering you need information on when Rendering actually happens. dynaTrace provides this information for both Internet Explorer and Firefox. The Timeline View has a Rendering Column that shows when the browser executed certain Rendering tasks. The following screenshot actually shows us that the Yahoo News Page actually uses progressive rendering. This means that the HTML Content is flushed out early on, allowing the browser to already parse and display some of the HTML before the complete HTML document was downloaded:

Rendering happens while the initial HTML Document gets downloaded. Rendering also happens when additional resources such as images and css files get downloaded

Rendering happens while the initial HTML Document gets downloaded. Rendering also happens when additional resources such as images and css files get downloaded

Optimizing the First Impression Time (time of first Drawing event) and also optimizing Rendering activity on the page in general are now possible across browsers by using dynaTrace AJAX Edition.

JavaScript/DOM Tracing

The key capability of dynaTrace is not only to identify long running JavaScript handlers. dynaTrace traces all JavaScript executions including calls to the DOM (Document Object Model) as well as calls to XHR (XmlHttpRequest).

This deep tracing provides several benefits:

  • Unlike a profiler, dynaTrace actually sees the individual method calls with method arguments and return values. Outliers can therefore be identified and are not hidden in average values
  • Unlike a debugger, dynaTrace is low overhead and thus doesn’t impact execution time of the JavaScript significantly. This allows us to analyze the exact execution behavior of timers and intervals
  • Unlike other tools, dynaTrace actually traces calls into the DOM. The DOM is the most performance-critical component in the browser. Read and Write access can be very expensive and should be optimized.

When analyzing JavaScript/DOM Traces we use the dynaTrace PurePath view. We can open this view through the Context Menu on a slow JavaScript method listed in the Performance Report. Another option is to double click on a JavaScript execution block shown in the Timeline. The following screenshot shows a JavaScript trace of the slow running getElementsByClassName functions that are called on the Yahoo News Page. This method iterates through all DOM Elements. In order to do that it queries all elements using getElementsByTagName.

The yellow arrows indicate read, write property access as well as method calls on the DOM

The yellow arrows indicate read, write property access as well as method calls on the DOM

In addition to looking at Traces of individual JavaScript handlers, dynaTrace also provides the Hotspot view. The Hotspot view analyzes all JavaScript, DOM and Rendering activity on a given page and shows which methods have the highest execution time contribution and which methods are called most frequently. As the underlying data of this presented information are the Deep-Dive Traces, we can pick a method that we want to analyze further, for example, who calls a method with particular parameters or who calls a method too often:

In the Hotspot View we see which JavaScript, DOM or Rendering activity contributes how much to the overall page load time. Back Traces help to identify the caller

In the Hotspot View we see which JavaScript, DOM or Rendering activity contributes how much to the overall page load time. Back Traces help to identify the caller

Deep tracing that includes JavaScript, DOM and method arguments comes with low overhead. The overhead of the actual JavaScript instrumentation is shown in the PurePath view for every loaded JavaScript file. The overhead when collecting the actual method execution depends on the number of JavaScript and DOM calls. The depth of tracing is configurable through the preferences and gives you full control on how much data to collect. Caution: In Firefox, tracing DOM calls comes with a larger performance penalty than in Internet Explorer as it requires disabling DOM Quick Stubs.

Automate Web Performance Optimization

We have already blogged about how to use dynaTrace AJAX Edition in a Continuous Integration environment by integrating it with your Selenium, Watir, Silk, QTP or WebDriver scripts. The idea is that whenever you have a functional test that actively drives a browser instance you can add dynaTrace AJAX into the mix and let dynaTrace record the browser activity driven by the test tool.

dynaTrace Ajax captures browser activity driven by your functional testing tool

dynaTrace Ajax captures browser activity driven by your functional testing tool

The great news with dynaTrace AJAX Edition 3 is that this can now be leveraged for both Internet Explorer and Firefox enabling you to automate performance analysis across browsers without having to modify your tests scripts. If you are interested in automation please check out the following posts:

Compare with your Competition

Following Best Practices on Web Performance Optimization as defined by Yahoo, Google and dynaTrace is a good thing, but doesn’t guarantee that you are ahead of your competition when it comes to web site performance. Best Practices are also not always applicable for all web sites. News Sites for instance have more images on a page that have a short expiration. Therefore it is OK that caching is used differently than on eCommerce sites where product images don’t change as frequently as the latest World News. Therefore dynaTrace not only allows you to compare your results against Best Practices but also against live websites. When you launch dynaTrace you will be prompted for your dynaTrace Community Account in order to download Live Performance Data

Enter your dynaTrace Community Credentials to get access to real live performance data

Enter your dynaTrace Community Credentials to get access to real live performance data

When opening the Performance Report you now have the option to compare your captured performance data with data from the Top Alexa websites. There are more categories to come over the next few months such as eCommerce, News, … The following screenshot shows the Performance Report comparing the results of Yahoo News to those of the Alexa 1000.

Compare your own results in the different performance categories with performance data captured daily from real websites

Compare your own results in the different performance categories with performance data captured daily from real websites

Comparing your performance metrics with real-life data gives you additional input on the areas on which you want to focus your optimization efforts. If your competition spends less time in Client Side JavaScript you may want to focus on optimizing your own JavaScript code. If you see that you are already doing a good job comparatively in leveraging the browser cache – even though you just scored Rank C – it is better to focus on other areas first.

Want to know more about dynaTrace AJAX Edition?

Start by downloading the free dynaTrace AJAX Edition and optimize your web pages by following the results of the Performance Report. Make yourself familiar with the deep diagnostics capabilities of dynaTrace AJAX by checking out the Top Client Side Performance Problems that have been solved with this tool.

And if your organization needs enterprise-class extended automation, end-to-end performance and automated regression analysis for modern Web 2.0 Applications, then you should read part two outlining the Premium Extensions to dynaTrace AJAX that provide what you need.

Comments

  1. Pavel Paulau says:

    Fantastic one. My congratulations!

  2. Good stuff. I saw the FF version launched recently. Any chance a version for webkit/V8 will be available in the future?

    • we definitely plan to extend the browser coverage. next on the list is IE9 – already working on this one. WebKit is on our list as well – but I cant make any promises on timing. hope you like the support we have for IE6, 7 & 8 as well as FF 3.6 and 4 – you should also check out what we have to offer in our Premium Extensions

  3. Took me time to read all the comments, but I really enjoyed the article. It proved to be very useful to me and I am sure to all the commenters here! It’s always nice when you. IT jobs

Comments

*


nine − 5 =