Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

@ServiceHost Debug="true" - performance penalty?

Is there a performance penalty of setting Debug="true" in the svc file? Is it significant enough to warrant setting it to "false" in a production environment?

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

Thanks

like image 771
Pking Avatar asked Apr 10 '12 12:04

Pking


1 Answers

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.

like image 143
Min Min Avatar answered Oct 05 '22 03:10

Min Min