调试=在web.config中真正=坏事? [英] debug=true in web.config = BAD thing?

查看:134
本文介绍了调试=在web.config中真正=坏事?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们看到大量虚拟内存碎片和内存不足的错误,然后它击中3GB的限制。

We're seeing lots of virtual memory fragmentation and out of memory errors and then it hits the 3GB limit.

编译调试设置为true在Web.config但我从每个人都问我不同的答案,并调试设置为true的原因各ASPX编译成RAM随机领域从而割裂了RAM和最终导致了内存问题?

The compilation debug is set to true in the web.config but I get different answers from everyone i ask, does debug set to true cause each aspx to compile into random areas of ram thus fragmenting that ram and eventually causing out of memory problems?

推荐答案

斯科特格思里(ASP.NET的开发团队经理)拥有的有趣的帖子吧

Scott Guthrie (manager of the ASP.NET development team) has an interesting post about it.

为什么你不应该离开调试最重要的点=真是:

The most important points why you should not leave debug="true" are:


  1. ASP.NET页面的编译时间较长(因为有些批处理优化被禁用)

  2. code可以执行更慢(因为一些额外的调试路径启用)

  3. 更多的内存在应用程序中运行时使用

  4. 从WebResources.axd处理程序下载脚本和图像不是由浏览器高速缓存,从而在客户端和服务器之间更多的请求

他还提到旗<部署零售=真/ >在machine.config中,这使得在全球范围内覆盖调试=真的所有标志一台机器上运行的应用程序(例如在生产服务器上)。

He also mentions the flag <deployment retail="true"/> in machine.config, which allows to globally override the debug="true" flag of all applications running on a machine (e.g. on a production server).

更新:以调试部署Web应用程序=真正的仍然很糟糕,因为你可以在阅读<一href=\"http://www.hanselman.com/blog/MostCommonASPNETSupportIssuesReportingFromDeepInsideMicrosoftDeveloperSupport.aspx\">Scott Hanselman的最近的一篇博客:

Update: deploying web apps with debug="true" is still bad, as you can read in Scott Hanselman's recent blog post:

这也是为什么调试=true是坏的。严重的是,我们不是在开玩笑。

Here's why debug="true" is bad. Seriously, we're not kidding.


  • 覆盖请求执行超时使其有效地无限

  • 禁用页面和JIT编译器优化

  • 在1.1,导致过多的内存使用量由CLR调试信息跟踪

  • 在1.1中,关闭动态页面批编译,从而导致每页1组装。

  • 对于VB.NET code,导致在WeakReferences过量使用(用于编辑和继续支持)。

重要提示:相反的是,有时认为,设置的零售=真的元素不是直接的解药其调试=真正的

An important note: Contrary to what is sometimes believed, setting retail="true" in a element is not a direct antidote to having debug="true"!

这篇关于调试=在web.config中真正=坏事?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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