Friday, 25 April 2014

compilation debug=”true” in ASP.Net on Production server.

Compilation debug mode “true” in web.config should be avoided when deploying an ASP.NET application on Production environment.
Disadvantages of keeping it "true" on production environment. 
  • The compilation of ASP.NET pages takes longer.
  • Code can execute slower.
  • Much more memory is used within the application at runtime.
  • Scripts and images downloaded from the WebResources.axd handler are not cached.
This last point is particularly important, since it means that 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.  This can slow down the user experience quite a bit

When <compilation debug=”false”/> 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:

Post a Comment