@ServiceHost Debug="true" - performance penalty?
In your ".svc"
file, if you are writing your service as inline code, or implementing service in "App_Code" folder and enabling debug
mode, it will impact the performance.
Generally, always set debug="false"
before you deploy to production. If debug mode is enabled, the performance of your application can be decreased.
In Release mode, the debug symbols are not baked into the assembly, so you cannot debug it using Visual Studio .NET or other source code debuggers. What's cool is that the code is also optimized during this build operation.
Seems that this switch controls debug symbols generation only for inline code.
Debug symbols for code-behind generation controlled by other options.
If you have no inline code, you don't hit the performance.
Meanwhile MSDN states the following:
Debug
Indicates whether the Windows Communication Foundation (WCF) service should be compiled with debug symbols. true if the WCF service should be compiled with debug symbols; otherwise, false.
The short answer is yes but if you want all the gory details, look at this good StackOverflow answer on the topic.