[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Performance - System.Web - Comiplation Debug="true"

Posted on 2009-04-30
Medium Priority
Last Modified: 2012-05-06
The default web.config for an ASP.NET Web Site has the <compilation debug="true" />.  The web.config warns that leaving this setting on in production is not advised because it impacts performance.

Does anyone know how much of a performance impact this setting incurs?  If it is turned off is there still a way to capture detailed information about where in the code an Exception occurs by logging the Exceptions?


            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.
    <compilation debug="true"/>

Open in new window

Question by:ppittle
  • 2
  • 2

Expert Comment

ID: 24274233
i do HealthMonitoring, depending on your app, but you can capture exceptions using try/catch, and then catch them with the health monitoring provider and have it send email or log ot event log or database, or however you want to do it.

Author Comment

ID: 24274294

Two Questions:
1)  If <compilation debug="false" /> is set in the web.config, is anything lost from Exception objects when they're captured in a try/catch and logged?  For example, is the stack trace still present?

2)  Are you aware of any measured data indicating how much of a performance loss is incurred by leaving <compilation debug="false" />?


Accepted Solution

rodmjay earned 2000 total points
ID: 24274350
here are a few considerations with debug=true, i would suggest not using it in production

Pages are not batch compiled.
Pages do not time out. When a problem occurs, such as a problem with a Web service call, the Web server may start to queue requests and stop responding.
Additional files are generated in the Temporary ASP.NET Files folder.
The System.Diagnostics.DebuggableAttribute attribute is added to generated code. This causes the CLR to track extra information about generated code, and it also disables certain optimizations.

There would be coniderable performace from each of these

Author Closing Comment

ID: 31576651
Thanks for the info.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Integration Management Part 2
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses
Course of the Month20 days, 2 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question