ASP.net MVC: why is AreaRegistration.RegisterAllAreas () so slow?

I have a small ASP.net MVC application with about 10 views and 2 controllers that will forever (and not forever, but between 30-50 seconds) load the site.

I did some profiling and found that more than 50% of the time was spent on the following line in my Global.asax.cs file:

AreaRegistration.RegisterAllAreas(); 

What could be the reason and how to increase productivity?

+4
source share
1 answer

Do you use MVC scopes? If not, just delete or comment on this line. I have noticed this before, but I have no real explanation.

+8
source

Source: https://habr.com/ru/post/1389461/


All Articles