Wednesday, July 7, 2010

Never run ASP.NET Applications with debug=”true” enabled in Live Server

We, rarely bother about the settings in Web.Config file of our application when moving from Development environment to Production/Live.

has big impact on the performance of the Web Application/Site.

When debug is set to true, the following happens in the application scope.

1) Batch optimizations will be disabled and hence the compilation of pages takes longer
2) Some additional debug paths get enabled which causes for slower execution of code
3) More memory is used within the application at runtime
4) Scripts and images downloaded from the WebResources.axd handler are not cached

All client-javascript libraries and static images that are deployed via WebResources.axd will be continually downloaded by clients on each page view request and not cached locally within the browser.

When is set, the WebResource.axd handler will automatically set a long cache policy on resources retrieved via it – so that the resource is only downloaded once to the client and cached there forever

No comments: