Why does it take 15 seconds to render a MVC view when debugger is attached?
I have a MVC solution running MVC 2.0 and Visual Studio 2010.
When running my solution with a debugger attached (F5) it takes 15+ seconds to render views, and I simply don't know why. Not just the first page, but every page. This happens in all browsers.
If I run the same solution without debugger (Ctrl+F5), loading a page takes < 1 second.
I specifically saying it's the vie开发者_C百科w, because the controller finish fast with and without debugger.
My solution is an Azure solution, but I don't know if Azure is part of my problem. I have this problem even if I run my website directly from IIS without using Azure's Compute Emulator (AKA AppFabric).
- Code is not optimized in debug mode.
- I think extra info in .pdb is being transfered to debugger.
- Maybe IntelliTrace is logging to much info.
Also, your view is rendered 15 sec once or every request, because if you hit it first time, it needs to be compiled.
精彩评论