Very slow running web application using Microsoft AJAX.NET

Last week we had a very serious issue of performance in our web application that is based on AJAX.NET (mainly under IE6).

few facts:

  • our client response is quite large (between 70K – 250k)
  • we are using AJAX.NET with partial update panels
  • we have approx 4 update panels that return after post back
  • we have lots of nodes (elements)

The average time it take for the response to be updated on the browser for most of our use cases is:

Browser Time (seconds)
IE6 (SP3) 8
IE7 6
Fire Fox 3 5
Chrome 3.5

 

After intensive analysis that we have done that included:

  • Checking entire user flow with fiddler
  • code review (of some parts)
  • Profiling of code
  • Numerous running on many platforms

The root cause (or actually points) that effects the client side performance is:

  • Apparently the debug=”TRUE” on the web.config which causes all AJAX.NET JS files to be rendered in debug mode (larger, more comments, larger names and LOTS of assertions) –> Dramatically effects performance (approx twice the time)
  • Our response is too large (wider update panel) and contain number of update panels (reduction to 50% of the size reduced approx 1 seconds in release mode)
  • Our update panel contains lots of node (DOM hierarchy) which affects the disposal of the DOM prior to the replacement of the innerHTML (did you know it – and to the point this)

My personal lesson learning for that scenario is “be cheap” and don't waste bytes. (Also always make sure that the basic weren't forgotten - debug)

At the end we cut approx 70% of the run time by doing the above

Hope this post will save other some time.

P.s. IE6 is the worst browser i have ever witnessed (Performance, compliance and memory handling)

Very slow running web application using Microsoft AJAX.NET Very slow running web application using Microsoft AJAX.NET Reviewed by Ran Davidovitz on 2:08 PM Rating: 5

3 comments:

Anonymous said...

Thanks for this post. We had the same problem and it helped a bit :)

Ran Davidovitz said...

@Siderite: great post very pro, we used a product called ZumiPage that made what ASP.NET update panel is doing but approx 2 years before :), one of the later version it had support for htmlDiff (but we didn't use that because of memory foot print). how do you handle the back button(history of same page)
@"Anonymous": keep me posted on the progress maybe we can share some more knowledge

Anonymous said...

Great post. I was checking continuously this blog and I
am impressed! Very helpful info particularly the last part :) I care
for such info a lot. I was looking for this particular information for a long time.

Thank you and good luck.

my webpage :: http://ipadvideolessonblog.com

Powered by Blogger.