gpt4 book ai didi

.net - @ServiceHost 调试 ="true"- 性能损失?

转载 作者:行者123 更新时间:2023-12-02 03:02:47 25 4
gpt4 key购买 nike

在 svc 文件中设置 Debug="true"是否会降低性能?它是否足够重要,足以保证在生产环境中将其设置为“false”?

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

谢谢

最佳答案

在您的“.svc”文件中,如果您将服务编写为内联代码,或者在“App_Code”文件夹中实现服务并且启用debug模式,会影响性能。

通常,在部署到生产环境之前,请始终设置 debug="false"。如果启用 Debug模式,应用程序的性能可能会降低。

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.

关于.net - @ServiceHost 调试 ="true"- 性能损失?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10088447/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com