Profiling JavaScript With Ajax View Tool: Spot Poor Performance Client Script In No Time
Ever wondered why your application unreasonably slow? You have it all - most powerful hardware, your database is tuned, SQL queries are optimized, network is barely utilized, and .Net code is super efficient. So why on earth response time is so slow?
The answer might lie in recently developing area – client script. I’ve witnessed few over-AJAX’ed applications with poor performance and far from the best user experience. Quite the contrary what AJAX and other client script flavors are for…
In this post I will show how Ajax View – JavaScript profiler project from Microsoft Research – helped me to spot client side script bottlenecks in no time and make the customer happy.
- Ajax View – the tool. Ajax View is available for download here. The tool's goal:
"The goal of the Ajax View project is to improve developer's visibility into and control over their web applications' behaviors on end-user's desktops."
- Profiling process. The creators of the tool, Emre Kıcıman and Ben Livshits, provided simple and very useful walk through on how to install and use the tool.
- Recommendations to improve client side script. Eric Lawrence, Fiddler tool creator, kindly pointed me to useful recommendations how to make JavaScript run faster:
- Fiddler PowerToy - Part 2: HTTP Performance
- Steve Souders' Rules for High Performance Websites
- High Performance DHTML
- High Performance HTML
- IE + JavaScript Performance Recommendations - Part 1
- IE+JavaScript Performance Recommendations Part 2: JavaScript Code Inefficiencies
- IE+JScript Performance Recommendations Part 3: JavaScript Code Inefficiencies
- Customer's story. During recent application performance review we identified in no time the following problems using Ajax View:
Issue | Recommendation |
1200 lines of inline JavaScript | Make JavaScript and CSS External |
Using XmlHttp object with its async property set to true while performing time consuming call to the server | Do not re-invent the wheel, use ready to-go, proven AJAX Libraries like ASP.NET AJAX |
Manipulating large XML islands inefficiently | Do not use large XML documents - neither client side nor server side. Use lazy approach of downloading the data on demand. |
My related posts
- Identify ASP.NET, Web Services, And WCF Performance Issues By Examining IIS Logs
- Improve Web Application Performance By Reducing Number Of Http Requests - Fiddler To The Rescue
- Performance Testing For The Masses
Comments
- Anonymous
March 11, 2008
How to anticipate or better off avoid performance related "surprises" during load and stress - Anonymous
March 11, 2008
How to anticipate or better off avoid performance related "surprises" during load and stress - Anonymous
November 01, 2008
Field experience proves - the earlier performance is tackled in development lifecycle the better results