Question

For some reasons my server response time is 18 seconds for one of the pages in my ASP.NET MVC application.

How can I check which operation is taking that long? I want to know in what point of the application lifecycle the time is being wasted.

Is there some third-party extension for VS or may be a build in feature of the VS debugger to find out what I need?

Was it helpful?

Solution

Use Glimpse, which has support for ASP.NET MVC 2, ASP.NET MVC 3 and ASP.NET MVC 4 via Extensions.

You will be primarily interested in the Execution tab, as it will show how long each controller action is taking to execute, which will let you dig into the "slow" ones, like this:

enter image description here

OTHER TIPS

Try glimpse or Mini Profiler. They are both free and worth the 10-15 minutes it takes to get them working.

Depending on which version of Visual Studio you're using, there is a built-in unit testing project you can add to your solution. I believe this is actually one of the options given to you when creating an ASP.NET MVC application.

You can also look into using a profiler like ANTS Performance Profiler from Red Gate.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top