HOW TO speed up a ASP.NET AJAX web app
Just like making web pages cross-browser doesn't have a straight-forward solution, speeding up your ASP.NET AJAX based web application requires an understanding of it's internal aspects. Outlined below are some performance tips compiled from various sources -
Generic ASP.NET performance improvement tips that also strongly relate to ASP.NET AJAX -
To be continued...
Also see - HOW TO improve the front-end performance of a website
- UpdatePanels can sometimes be dangerous. If you are using an UpdatePanel, reduce the number of controls within it if you can.
- Update without UpdatePanels - call WebMethods from JavaScript using ASP.NET AJAX
- Enable Compression and Caching using the scriptResourceHandler element in the web.config of your ASP.NET AJAX application.
- Consider setting ScriptManager control's properties LoadScriptsBeforeUI to "False" and explicitly set ScriptMode to "Release".
Generic ASP.NET performance improvement tips that also strongly relate to ASP.NET AJAX -
- Use tools like FireFox Firebug addon YSlow or the Fiddler add-on neXpert, to analyze web pages and identify why they're slow.
- Don’t run production ASP.NET Applications with debug=”true” setting in web.config -
- Disable viewstate if possible.
- Cache images & other static files that do not change frequently.
To be continued...
Also see - HOW TO improve the front-end performance of a website
Totally agree that understanding internal aspects of AJAX is a key in solving performance problems. What makes UpdatePanel slow? While AJAX is considered by many a client-side technology, the ASP.NET AJAX request, just like web form request, submits to the server a Viewstate for the entire page and requires full page execution. The response downloads bulky HTML including ViewState. Multiple ScriptResource.axd requests also slowdown initial page load.
ReplyDeleteAJAX pages would be much faster if UpdatePanel could download only data-related traffic without Viewstate and generate HTML on the client, or even better, could be entirely executed on the client without server roundtrips. It would be ideal if post request could be compressed, JavaScript resources download from the server could be avoided, and all of that almost without coding.
To implement this approach we developed ASP.NET software accelerator, Web Stimulus.