.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
But I've made a blog aggregator in ASP.Net MVC (http://blogvani.com) which is pretty big too, and right now I am creating Q&A script.
Oh yeah, and I shifted to .Net 4 on one of my production servers because I am prototyping the Q&A script online, and shifting to the new framework broke all my apps whic were made on 3.5. I had to go and delete some entries from the web.config of all 3.5 sites to make them work.
But it was well worth the effort, because now my new app (in testing) is running on ASP.Net MVC2, Framework 4, and I am using the Task-Parallel library!!
Am looking forward to seeing Umbraco on 4.0 though.
I'm using Plesk in my Production Server, and I need to install Framework 4 to make ready two sites.
Because the people of Plesk don't want to hear nothing about Plesk and Framework 4, until they have released then new version with Framework 4 support (¿Anybody knows when?), ¿is there a way to install .Net Framework 4 in a Production Server with Plesk, maintaining the other sites running in FX3.5, and without problems to work with Plesk on them?
- I'm sorry about my english, hope can be read -
;-)
Comments are closed.
I would be interested in seeing the numbers from a larger .NET project like Umbraco, but this is very good news.