Author Archive

Folder Substitution Management in dotTrace

Friday, August 8th, 2008

The source view provided by dotTrace lets you quickly analyze source code and spot its problem areas without switching to another application.

However, when you build your applications using a server-based build tool such as, for example, TeamCity, and then start analyzing your local copy of the application, working with the source view can be tricky. The paths defined in the .pdb file built at a server usually cannot be used locally on your machine. In that case dotTrace will inform you that it cannot find the necessary source files.

The Folder Substitution Management feature provided by dotTrace lets you define folder mappings for application sources and effectively work with the project source files, no matter where they are located.

When the tool fails to find a source file using the current settings from the .pdb file, you are offered to locate it manually:

Source Code is Unavailable

Click the browse… link in the source view and locate the folder, where you know your local copies of the source files reside. As soon as you locate the root folder, the tool will scan the entire subtree and display the list of source files relevant to the function you are examining at the moment:

File Matching Feature of dotTrace

Just click the matching file link, to view the source.

DotTrace has now extracted the common base path and automatically created the folder mapping pattern. This pattern is automatically applied every time, when displaying this application’s source code.

You might occasionally come across a situation, when different parts of your application’s source code reside under different roots. This is the case to use several custom folder mappings.

To view the existing folder substitutions or create new ones, select View | Manage Folder Substitutions (Ctrl+Alt+S):

DotTrace\\\'s Folder Substitutions Dialog

Use this dialog to add, remove, edit and rearrange any custom folder substitutions you might need.

The dotTrace’s folder substitutions feature lets you work with your application’s source code even more smoothly.

Technorati tags: , , , ,

Snapshot Comparison in dotTrace

Thursday, July 17th, 2008

dotTrace lets you spot problem portions of code with great ease and accuracy. Once all major bottlenecks are located, you can start eliminating these bottlenecks.

After you apply certain optimization effort, it would be nice to compare the performance of your application before and after the optimization.

dotTrace provides a useful feature that lets you assess the results of optimization with great precision. The feature’s called snapshot comparison.

Let’s see how it works.

It is assumed that you have saved the first snapshot (before optimization). Then you do some work on the application to optimize its bottlenecks.

To see the results of optimization, perform the following steps:

  • Open the first snapshot (before optimization) in dotTrace.
  • Profile your application once again to get a snapshot of the application after the optimization.
  • Once the second snapshot is loaded, either choose Tools | Compare CPU Tabs on the main menu or click the Compare CPU Tabs button on the main toolbar.


dotTrace will now load the comparison snapshot. It looks like a regular snapshot but compares two states of the same application. Consider the comparison snapshot of the sample application that comes bundled with dotTrace:

dotTrace Snapshot Comparison

It compares two working modes of the sample application. The first snapshot was taken in the slow mode, the second one in the fast mode.

The comparison snapshot offers a straightforward color-coding scheme: everything rendered green represents performance enhancements, everything red represents performance decreases.

While navigating the snapshot’s call tree, you can always get a precise indication on how much faster (or maybe slower) certain methods have become.
 

For each and every method you get a numerical representation of the performance enhancements. You can examine fluctuations in the following three parameters: relative change in time consumed (%), absolute change in time consumed (ms) and change in the number of calls.

Any number of custom filters can be applied to the comparison snapshot just like to a regular one. It helps you to exclude from view those items that are really of no interest to you in terms of performance alterations.

All the useful call tree navigation features are available here as well. Use To Next/Previous Unfiltered Node (Ctrl+Right/Left) and To Next/Previous Important Node (Shift+Ctrl+Right/Left) as much as you like.

Snapshot comparison is the ultimate way to assess the results of optimization and get a precise representation of the bottleneck elimination efforts.

Technorati tags: , , , , ,

dotTrace Call Tree: Smart Navigation

Thursday, July 10th, 2008

Usually, when profiling applications, you have to analyze the call tree. This part of the job is the most tedious: digging through the endless sequences of nodes distracts you from focusing on real problem areas. With dotTrace smart navigation, this task becomes much easier. Let’s see how it works, using the sample application that comes bundled with dotTrace.
 
In order to investigate the application’s behavior and spot potential candidates for optimization you usually navigate the call tree with a mouse or arrow keys.

 
dotTrace Call Tree

 
You are presented with the data on relative and exact timings as well as number of calls to particular methods. Percentage of time consumed by the method in relation to the thread’s root can be used here as a bottleneck signal. With the help of these concise but precise data we can find out who is the major time consumer in our case: the SetClip method.
 
As you can see, some calls are marked gray and sort of dimmed out in the GUI. Those are calls to filtered methods. By default, only system calls are filtered (Microsoft.*, System.*). However, dotTrace lets you apply any number of custom filters (View | Filters | Manage Filters… or Ctrl+Alt+F). This can be very helpful if you have little or no interest in investigating behavior of some functions (perhaps, because they can’t really be optimized).
 
To exclude filtered items completely from navigation process there is a pair of commands in the View menu which are also available through shortcuts: To Next/Previous Unfiltered Node (Ctrl+Right/Ctrl+Left) bypasses all filtered calls in the process of navigation.
 
Another pair of commands is To Next/Previous Important Node (Shift+Ctrl+Right/Shift+Ctrl+Left). It offers you the possibility to get from the initial ‘grouped by thread’ state right to the next method which can be of interest from practical perspective. The view becomes completely unfolded with the necessary item highlighted. All that can be done with the help of a single menu command or a handy shortcut:

 
dotTrace: To Next Important Node

 
When performing navigation between important nodes dotTrace goes down the call tree until it finds a node having two or more child nodes, each of which consumes at least 10 percent of the overall runtime. Selected becomes the child, which consumed the largest amount of time in comparison to other children.
 
Navigation between important nodes can be a tremendous timesaver, indeed!

Technorati tags: , , , , ,

ReSharper 2.0.1 Maintenance Release Now Available

Friday, August 25th, 2006

JetBrains ReSharper version 2.0.1 is now available for download at http://www.jetbrains.com/resharper/download/.
This release fixes a number of bugs and usability issues, in addition to substantial performance improvements. For more information, please see online Release Notes.
The update is a free maintenance release for all licensed users of previous ReSharper versions. All current users are highly encouraged to upgrade, due to the transition of the ReSharper development project to a new issue tracking system. So, the new release automatically sends bugs and exceptions to this new system.
Keep developing with pleasure!

Technorati tags: ,

ReSharper 2.0 help available online

Friday, June 23rd, 2006

Some of you will find it easier to read ReSharper help online instead of loading it in Visual Studio together with all the MSDN content ;)

And by the way, on the Docs and Demos page you can also find the Default Keymap, as well as ReSharper overview which contains all the major features of the 2.0 release.

Technorati tags: