@ServiceHost调试="真" - 性能损失? [英] @ServiceHost Debug="true" - performance penalty?

查看:101
本文介绍了@ServiceHost调试="真" - 性能损失?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有在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.

这篇关于@ServiceHost调试="真" - 性能损失?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆