Visual Studio调试/加载速度很慢

本文讨论了Visual Studio 2012 Express在调试ASP.NET MVC项目时出现加载和调试速度慢的问题。问题与DisplayTemplates加载符号数百次有关,导致加载时间延长。尝试的解决方案包括使用全功能IIS、禁用Symantec Endpoint Protection、关闭网络共享的离线文件、清理解决方案等,但并未完全解决问题。最终发现关闭'conhost.exe'进程和禁用'Native Code'调试器能暂时缓解问题,但根源可能与在重定向的网络驱动器上工作有关。
摘要由CSDN通过智能技术生成

本文翻译自:Visual Studio debugging/loading very slow

I'm at wits end. 我的智慧结束了。 Visual Studio is typically painfully slow to debug or just plain load ("start without debugging") my ASP.NET MVC sites. Visual Studio 通常很难调试,或者只是简单地加载(“启动而不调试”)我的ASP.NET MVC站点。 Not always: at first, the projects will load nice and fast, but once they load slow, they'll always load slow after that. 并非总是如此:首先,项目将加载得很好而且速度很快,但是一旦加载速度变慢,它们总是会在此之后加载缓慢。 I could be waiting 1-2 minutes or more. 我可以等待1-2分钟或更长时间。

My setup: 我的设置:

I'm using Visual Studio 2012 Express , currently, but I've had the same problem in Visual Studio 2010 Express as well. 我目前正在使用Visual Studio 2012 Express ,但我在Visual Studio 2010 Express中也遇到了同样的问题。 My solution is stored on a network drive; 我的解决方案存储在网络驱动器上; specifically, it's My Documents redirected to a network drive, if it matters. 具体来说,如果重要的话,它的My Documents会重定向到网络驱动器。 (It shouldn't. There are times where my site loads very fast under this setup.) (它不应该。有时我的网站在此设置下加载速度非常快。)

I load in Internet Explorer 9 usually, but the same problem happens in Firefox. 我通常在Internet Explorer 9中加载,但在Firefox中也会出现同样的问题。

This can happen in any ASP.NET MVC project I work on, and it seems to revolve around having DisplayTemplates, which all my ASP.NET MVC projects do. 这可能发生在我工作的任何ASP.NET MVC项目中,它似乎围绕着DisplayTemplates,我的所有ASP.NET MVC项目都是这样做的。 And it's all C# and Razor, if that mattered. 而这一切都是C#和Razor,如果重要的话。

Symptoms: 症状:

The system will load my symbols hundreds of times. 系统将加载我的符号数百次。 Basically, the following, but there are at least 300 such rows, each with ever-so-slightly different DLL files for the same CSHTMLs: 基本上,以下,但至少有300个这样的行,每个行对于相同的CSHTML,每个都有不同的DLL文件:

'iisexpress.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\b63f8236\6775085d\App_Web_contact.cshtml.22013bb9.xighmhow.dll', Symbols loaded.
'iisexpress.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\b63f8236\6775085d\App_Web_contact.cshtml.22013bb9.cv5hktkf.dll', Symbols loaded.
'iisexpress.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\b63f8236\6775085d\App_Web_statuscode.cshtml.22013bb9.1o77hs8i.dll', Symbols loaded.
'iisexpress.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\b63f8236\6775085d\App_Web_statuscode.cshtml.22013bb9.jja-77mw.dll', Symbols loaded.
'iisexpress.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\b63f8236\6775085d\App_Web_location.cshtml.22013bb9.l_e9ev_s.dll', Symbols loaded.
'iisexpress.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\b63f8236\6775085d\App_Web_location.cshtml.22013bb9.b4n59gom.dll', Symbols loaded.

In the above, I've got three DisplayTemplates: "Contact", "Location", and "StatusCode". 在上面,我有三个DisplayTemplates:“Contact”,“Location”和“StatusCode”。 It appears that IIS is loading symbols twice for each time the displaytemplate gets called. 似乎IIS每次调用displaytemplate时都会加载符号两次。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值