varunmaggo's say

Getting better never stops!

Tips to keep your web applications healthy and performance tuned (PRODUCTION ENVIRONMENTS)

leave a comment »

  1. Always set debug=”false” in web.config production environment.
  2. Always set trace=”false” in web.config production environment
  3. If you are using asp.net 2.0 or higher version then always use precompiled version of your code and also prefer web application project over website. If you are using website then always publish it and then upload that precompiled version of your site in production environment.
  4. Always compile your project in Release Mode before uploading application to production environment.
  5. Use cache api as much as possible it will decrease your server roundtrip and boost application performance. ASP.NET 2.0 or higher version provides functionality called sqlcachedependancy for your database caching. It will validate cache with your database operation like insert,update and delete and if not possible with it then use the file base caching.
  6. Remove blank spaces from your html it will increase your kb. You can use regular expression to remove white spaces.
  7. For asp.net 2.0 and higher version use master pages. It will increase your performance.
  8. Prefer database reader over dataset unless and until you have specific reason to use database.
  9. Use ADO.NET asynchronous calls for ado.net methods. asp.net 2.0 or higher version is supporting your performance. If you are using same procedure or command multiple time then use ADO.NET Prepare command it will increase your performance.
  10. Do IIS performance tuning as per your requirement.
  11. Disable view state for your controls if possible. If you are using asp.net 2.0 or higher version then use asp.net control state instead of view state. Store view state in session or database by overriding the default methods for storing view state.
  12. User Server.Transfer instead of response.redirect.
  13. Always use inproc session state if possible.
  14. Use Ajax for your application wisely. Lots of Ajax calls for a page will also decrease your performance.
  15. Measure your application performance with tools like redgate profiler,firebug and whyslovw from yahoo.
  16. User System.Text.StringBuilder for string concatenation its 4 times more faster then the normal strings.
  17. Right JavaScript in .Js files and place it as bottom of the application.
  18. Use Separate CSS files for styling of application.
  19. User database paging over normal paging while displaying huge amount of data.
  20. Call web service from java script instead of server side. Use asynchronous calls to call a web method from web service.
Advertisement

Written by Varun Maggo

August 26, 2011 at 6:27 am

Posted in ASP.NET

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.