Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Visual Studio Toolbox: Performance Profiling

Download

Right click “Save as…”

In this episode, Robert shows how to use the profiling tools in Visual Studio Premium and Ultimate to identify performance issues in your applications. He demonstrates two profiling methods: Sampling and Instrumentation. Sampling collects data on the CPU methods are using. Instrumentation collects data on how much time each method takes to run. Once you know which areas of your code are most impacting performance, you know where to start looking for ways you can improve that performance.

Tag:

Follow the Discussion

  • Mohammad OwidatOwidat @Mohammad​Owidat

    Hi Robert,

    I like your show  Smiley

    Thanks for this very nice episode, it was very interesting and helpful for me, if you can show us more examples about profiling and analyzing code for different type of projects such as ASP.NET and WCF applications and how to dive deep in to code, also you can show us third-party extensions that help us profiling and analyzing code.

    Regards,

  • very interesting,thanks

  • jabitjabit

    PROS:
    1. Free profiling for the masses (almost).
    2. This has most of the features of some 3rd party products like JetBrains' dotTrace and at the moment has much deeper reach into profiling external (not my code) functions through symbols. For example, I was using a 3rd party library the other day and when I sampled my application I found that System.String.ToLower was being called a LOT. But I wasn't calling it! I easily found that the 3rd party library was the culprit by clicking "Functions calling this function". Being able to see the specific line in your code which is calling some expensive external code is AWESOME!

    CONS:
    1. This is a nice addition to VS, but it should be available to all editions of VS2010.
    2. When in Sample mode, it doesn't give you any weight (time taken) behind those measurements. This video is the perfect example, String.Concat was being called a lot but it's not a huge deal since it only takes less than 5% of the time taken. You can go to Instrumentation to get the time taken but then there's no line-by-line highlighting in the function to see which lines are taking all that time in the function. You have to guess or try to manually cross reference it with the Sampling report. The JetBrains tool combines into a single profile report so you can see which functions are taking the most time and how many times they were called, all in one view/profile. The VS team should take notes.
    3. It is definitely a V1 tool and has some annoying visual problems. The scrolling on Summary view is pretty bad. When viewing the Call Tree, if you expand a function the "Function Name" column doesn't get any wider, so if you have to drill down deep you find yourself widening and shortening the column a lot. Minor visual issues but still annoying.

    FUTURE SHOW:
    When you go to the properties of the Target, you can "Enable Tier Interaction Profiling" which sounds very interesting.
    JavaScript profiling also sounds interesting.

  • Informative!

    Since I program in C# and native C++, is this profiler available only for .NET language? Thanks!

  • SofiaSofia

    Very useful and straight forward to the point! Thank you. I enjoy watching and applying the steps to optimise the project I am working on atm.

    It would be nice if the tool can be expanded to profile LINQ query that EF uses. Or may be if any third party tool if it's not built-in VS.

    I read jabit comment as well, good points.

Remove this comment

Remove this thread

close

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.