Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

increase the performance of web site?

When designing a ASP.net WebForm application what are some important steps to take (or hacks if you like to use the term) to ensure the best possible performance (in terms of speed, stability, and scalability)?

like image 594
Kanwar Singh Avatar asked Mar 08 '13 12:03

Kanwar Singh


2 Answers

  1. Avoid round trips to server
  2. Wherever possible user AJAX calls.
  3. Implement Caching.
  4. Avoid using Viewstate wherever possible

For further more read these links.

  • Improve Web Application Performance
  • ASP.NET Web Site Performance Improvement
like image 74
Mayank Pathak Avatar answered Sep 22 '22 19:09

Mayank Pathak


Since so many things can affect performance, it's difficult to provide such a list. We may make assumptions about your code that aren't correct, and may focus on the wrong areas while you suffer poor performance from something we would otherwise take for granted.

Having said that, in general you might keep an eye on:

  • Don't over-use ViewState. (I'd argue not to use it at all, but that's another issue entirely.)
  • Keep page resources small (minified text, good image encoding, etc.).
  • Ensure page resources are properly cached once downloaded.
  • Try to move most UX logic client-side. (Avoid post-backs for things you can otherwise do in JavaScript, fetch data asynchronously where possible in small chunks, etc.)

The list can go on and on, and that's just with the web tier of the application. You could easily encounter site performance problems resulting from slow server-side code or server-side resource dependencies (database, etc.) that can't be debugged in the browser.

So the main point is to learn your debugging tools. Through combinations of browser tools (FireBug, Chrome Developer tools, etc.), Visual Studio debugging (or whatever else you may use for your .NET code), good logging, and even profiling tools you can identify your bottlenecks and tweak your system accordingly.

like image 22
David Avatar answered Sep 21 '22 19:09

David