1

I have an application based on ASP.NET MVC V4 / SQL SERVER 2008 / WCF. This app will connect to some databases (DAL has coded our self) and other application via WCF services. There are many entity classes & services. Now I am not sure which part causes performance bottle neck.

Can anyone provide help with tools / solutions to help improving performance?

1
  • Logging framework is almost focused on errors cases, to write details of exceptions. Sometime is used for critical sections, not every functions. Commented Jun 29, 2015 at 14:51

3 Answers 3

4

My proposal would be the light-weight MiniProfiler designed by the team of stackoverflow. It's easy to define what to profile:

using StackExchange.Profiling;
...
var profiler = MiniProfiler.Current; // it's ok if this is null
using (profiler.Step("Set page title"))
{
    ViewBag.Title = "Home Page";
}
using (profiler.Step("Doing complex stuff"))
{
    using (profiler.Step("Step A"))
    { // something more interesting here
        Thread.Sleep(100);
    }
    using (profiler.Step("Step B"))
    { // and here
        Thread.Sleep(250);
    }
}

It will give you feedback like this:

example profiling result

There are packages for MVC, EF and WCF.

Sign up to request clarification or add additional context in comments.

Comments

3

As i said in this question ASP.NET MVC application profiling, you can use Glimpse for ASP.NET MVC profiling and here is a a plugin to track WCF calls in Glimpse and show them on the timeline. The requests are captured via GlimpseWcfClientInspector which implements IClientMessageInspector: https://github.com/stweb/Glimpse.WCF

I have never used them both (MVC & WCF) in the same application.

You can read the following in the referred question too. (for MVC)

If you're not a database boy like me, you'll love using Glimpse.

Glimpse is the diagnostics platform of the web.

Providing real time diagnostics & insights to the fingertips of hundreds of thousands of developers daily.

So you can start by grabbing Glimpse from NuGet.

PM> Install-Package Glimpse.MVC5

PM> Install-Package Glimpse.EF6

Initial configuration is the following:

  • In the configSections:

ConfigSections

  • And after that: Web&WebServer

Sorry for that but i waste 10 minutes trying to add xml code/quote/everything. For further configuration and others, here: http://getglimpse.com/Docs/Configuration

After that you must navigate to /glimpse.axd or what path did you specified there and enable (it's a cookie).

Here is a site that is using Glimpse so you can see what's giving to you. Render view time/wire time/sql time/ajax profiling & so on.. http://play.getglimpse.com/

It is very extensible having plugins and so on. You can search.

And here is a talk that you can watch for reviewing some features and to convince you to use glimpse: https://www.youtube.com/watch?v=IGMYogdKYyw

And if you need to see ONLY the sql queries not the whole (rendering process etc.) you can press the glimpse circle and go to the sql tab. You'll have a view like the following: SQLTabView

1 Comment

You can try and come back with a feedback. Glad that i could help you.
0

You can use the inbuilt performance profiler tool in Visual Studio.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.