I have a small ASP.net MVC application with approximately 10 Views and 2 Controllers, which takes forever (not forever but between 30-50 seconds) to load a site.
I did some profiling and found out that over 50% of the time was spend on the following line in my Global.asax.cs file:
AreaRegistration.RegisterAllAreas();
What could be the reason and how can I improve the performance?
Are you using MVC Areas? If not, simply remove or comment that line out. I’ve noticed this before but have no real explanation for it.