Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

We are currently using Visual Studio 2010 and the project is targeting .NET Framework 4.0.

The project has over 200 ASCX controls and nearly 900 RESX resource files. It generates a Temporary ASP.NET Files folder which contains over 2000 files.

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.

When we start debugging the project it seem to take forever for it to load (roughly 5 minutes or so).

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.

like image 518
Avalanchis Avatar asked Oct 16 '12 15:10

Avalanchis


1 Answers

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

like image 181
Khan Avatar answered Oct 22 '22 04:10

Khan