@ServiceHost Debug = "true" - a performance penalty?

Is there any performance limitation when setting Debug = "true" in the svc file? Is it significant enough to guarantee its β€œfalse” in the production environment?

%@ ServiceHost Language="C#" **Debug="true"** Service="AwesomeService" %> 

thanks

+9
performance wcf svc
source share
3 answers

In your ".svc" file, if you write your service as embedded code or embed the service in the App_Code folder "and enable debug mode, this will affect performance.

As a general rule, always set debug="false" before deploying to production. If debugging mode is enabled, application performance may be reduced.

In release mode, debugging symbols are not baked into the assembly, so you cannot debug it using Visual Studio.NET or other source code debuggers. What is great is that the code is also optimized during this build operation.

+5
source share

This switch seems to control the generation of debugging symbols for inline code only.

Debugging symbols for generating code controlled by other parameters.

If you don’t have inline code, you don’t get into performance.


Meanwhile, MSDN states the following:

Debugging

Specifies whether to compile the Windows Foundation Foundation (WCF) using debugging symbols. true if the WCF service must be compiled using debugging symbols; otherwise false.

+3
source share

The short answer is yes , but if you want to know all the details, look at this good Karu answer on this topic.

+2
source share

All Articles