@ServiceHost调试="真" - 性能损失?损失、性能、ServiceHost、QUOT

2023-09-03 16:18:05 作者:仙女味的小巫女

有没有在SVC文件设置调试=真的性能损失?它是足够的显著,以保证在生产环境中,它设置为假?

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" %>

感谢

推荐答案

在你的SVC的文件,如果你写你的服务为在线 code或实施服务 APP_ code 文件夹,使调试模式下,它会影响性能

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.

在发行模式下,调试符号不烤成的组装,因此   使用Visual Studio .NET或其他来源的code不能调试它   调试器。什么是酷的是,code为在此也进行了优化   建立操作。

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.