tags:

views:

138

answers:

5

Hi to All,

I had 1/2 web application prepared. I had seen that the performance getting very slow when using the ajax control compare with using javascript but only when that is deployed on the server.

Why is this problem problem arriving when ajax controls used in application, performance sleeps & not opens the pages quickly.

What is the solution for this to improve performance when ajax control use & it deploy on the server.

Regards, Girish

+1  A: 

Yes.

Well, the reason it's slower when you deploy to the server is because the ajax requests now have to go over the entire internet. This is different compared to running locally, when the requests do not go over the internet.

How to speed it up?

  • Make less calls.
  • Return more things per call so you can make less in general
  • Return as little as possible, in a condensed format if possible
  • Consider enabling gzip on your server
  • other such things
Noon Silk
+1  A: 

Take a look at the improvements made for stackoverflow: http://blog.stackoverflow.com/2009/08/a-few-speed-improvements/

Brian Rasmussen
+1  A: 

The other answers are good for general optimization, but I'm thinking there's an inherent problem with your understanding of the request flow in your application. For all intents and purposes, "ajax" is javascript.

The first and most important thing you can do is get Firefox and use firebug.

This will allow you to see what requests are made to the server, how long they take, and much, much more. This will give you a better understanding about the performance of the two different versions of your app.

You need to better understand your problem before we can really help you.

Glenn
A: 

Consider using the ToolkitScriptManager instead of ScriptManager, it will merge all the requests for AJAX controls in a single request. This will increase the performance since there are less requests. Also, make sure that you have set the in the WebConfig when moving to the production server. When debug is set to true, the performance slows down dramatically.

Genady Sergeev
A: 

when you deploy your AJAX based application, your Script Manager script mode should be Release

<asp:ScriptManager ID="ScriptManager1" runat="server" ScriptMode="Release">
</asp:ScriptManager>
Muhammad Akhtar