.NET 4 Web Application Startup Time
I was chatting with Jonathan Hawkins and some of the folks on the ASP.NET team about performance and Jonathan mentioned the startup time for large ASP.NET applications is improved on .NET 4. There are some improvements in the CLR and in ASP.NET itself that helped. If you have a giant app, you should do some tests.
The word from the ASP.NET team is that you'll see improvements when the .NET framework (CLR) is warm in memory but the Web App is cold on disk. This is for shared hosting scenarios where the web server is loading and unloading web applications while .NET remains in memory.
Web App Name | NETFX3.5 SP1 | NETFX4 | Change | Change as % of NETFX3.5 |
blogengine | 1.959s | 1.702s | (0.256s) | -13.08% |
dasblog | 3.151s | 2.818s | (0.333s) | -10.58% |
dotnetnuke | 4.026s | 3.621s | (0.406s) | -10.07% |
screwturnwiki | 1.579s | 1.500s | (0.080s) | -5.03% |
Median Improvement | (0.295s) | -10.32% | ||
Environment: NETFX v4.0, Win7-x86, 7200 RPM, 4GB, 2 Cores |
If you're interested in one of the reasons, there's a switch in C:\Windows\Microsoft.NET\Framework\v4.0.xxxx\Aspnet.config called shadowCopyVerifyByTimestamp that ASP.NET uses to startup up the CLR. The CLR optimized in .NET 4 how shadow copy assemblies are loaded by removing an unnecessary file copy if nothing's changed. Hence, part of the improvement in cold web app startup.
What's the biggest ASP.NET application that you've got?
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.



About Newsletter