简体   繁体   English

带有数千个临时ASP.NET文件的ASP.NET网站调试极其缓慢

[英]ASP.NET Web Site Debugging Extremely Slow with several thousand Temporary ASP.NET Files

My team is responsible for maintaining a legacy ASP.NET Webforms Web Application Project. 我的团队负责维护遗留的ASP.NET Webforms Web应用程序项目。

We are currently using Visual Studio 2010 and the project is targeting .NET Framework 4.0. 我们当前正在使用Visual Studio 2010,并且该项目的目标是.NET Framework 4.0。

The project has over 200 ASCX controls and nearly 900 RESX resource files. 该项目具有200多个ASCX控件和近900个RESX资源文件。 It generates a Temporary ASP.NET Files folder which contains over 2000 files. 它会生成一个包含2000多个文件的ASP.NET临时文件文件夹。

Of these temporary files, there are 121 .cmdline files, 151 .compiled files, 64 .delete files, 121 .err files (all of which are 0 bytes), 121 .out files, 59 .pdb files, 121 .tmp files, and 246 .cs files. 在这些临时文件中,有121个.cmdline文件,151个.compiled文件,64个.delete文件,121个.err文件(均为0字节),121个.out文件,59个.pdb文件,121个.tmp文件,和246个.cs文件。

When we start debugging the project it seem to take forever for it to load (roughly 5 minutes or so). 当我们开始调试项目时,它似乎要花很长时间才能加载(大约5分钟左右)。

The debug output window shows many, many lines similar to: 调试输出窗口显示许多行,类似于:

'w3wp.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\project\c8633237\88f5a808\App_Web_snat3rsu.dll'

These lines appear slowly, roughly one every second until eventually the first page loads. 这些行显示的很慢,大约每秒一次,直到最终加载第一页。

Once the first page loads in the browser, the project performance seems reasonable, but getting there seems to take an inordinately long time. 一旦在浏览器中加载了第一页,项目的性能就看似合理,但是到达那里似乎要花费很长时间。

I'm looking for suggestions on how I can improve the load time for this project. 我正在寻找有关如何改善该项目的加载时间的建议。

I'm concerned that there is something fundamentally wrong with the project that needs to be addressed because it seems unreasonable that it should take 5 minutes for it to load in the debugger. 我担心该项目存在根本上的问题,需要解决,因为在调试器中加载它需要5分钟的时间似乎不合理。

It is normal to have your load time (the first compilation) with the number of resource files you have. 通常,将加载时间(第一次编译)与您拥有的资源文件的数量一起使用。 The first time it loads it will pre-compile stuff so the second time you run it, it will be faster. 第一次加载它会预编译内容,因此第二次运行它会更快。 I will let you try to implement what is on this site. 我将让您尝试实施此站点上的内容。

https://web.archive.org/web/20171230155418/http://blog.lavablast.com/post/2010/12/01/Slash-your-ASPNET-compileload-time.aspx https://web.archive.org/web/20171230155418/http://blog.lavablast.com/post/2010/12/01/Slash-your-ASPNET-compileload-time.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM