Optimize asp.net getUserManager id

In asp.net web api identity:

There is a method in ApplicationOAuthProvider.cs:

var userManager = context.OwinContext.GetUserManager<ApplicationUserManager>();

This same method takes 4 seconds, but the basic request takes only 170 milliseconds.

I can not understand what is happening. Can anyone help how I can optimize this method.

Thanks in advance

+4
source share
1 answer

This method can take a lot of time if it is the first time you call it after you deploy your application, since it must load the necessary frameworks. After loading frames once, the method should be faster.

0
source

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


All Articles