Reputation: 2124
I've got a web page which is implementing cookie based ASPNET Forms Authentication.
Once the user has logged in the page, he can edit some information using a form which is created using a partialview and returned to him as a dialog for editing. The action linked to the partial view is decorated as follows:
[HttpGet]
[OutputCache(Duration = 0, VaryByParam = "None")]
[Authorize(Roles = "test")]
public ActionResult changeTripInfo(int tripID, bool ovride=false)
{
...
}
The problem i am experiencing is the latency between the request and the time when the dialog is shown to the user: time ranges between 800 and 1100 ms which is not justified by the complexity of the form.
Investigating with Glimpse turns out that the time to process the AuthorizeAttribute
(see snip) sums up to at least 650 ms which is troubling me.
Looking at the Sql server log, the call which checks the user roles takes, as expected, virtually nothing (duration 0).
How can I reduce this time?
Am I missing some optimization?
Or should I assume this is the normal duration to execute the attribute (I cannot run unbiased tests on differente servers)?
-EDIT-
added the Sql server call log
Upvotes: 2
Views: 151
Reputation: 789
Is this the authentication time between your form and the SQL Db that is holding your credentials?
Upvotes: 1