Tips on using the call tree
Published 11 June 2013
Optimizing your code
You can use the call tree to locate methods that may be good candidates for optimization:
- Order the call tree with the slowest stack traces at the top. If necessary, click the Time with children column heading to change the stack trace order.
- Starting with the slowest stack traces, look for method pairs where subsequent values for Time with children reduce substantially as you move down the stack trace. Methods with higher values in such pairs may be good candidates for optimization.
To show methods that may be good candidates for optimization, on the Tools menu, click Suggest methods to optimize. Suggested method names are marked with an asterisk (*).
In general, the better you understand the structure and meaning of your code, the more easily you will be able to interpret the data collected by the profiler.
To reduce the number of methods shown, you can do either of the following:
- In the Display options dropdown menu, choose Methods with source.
Select a shorter region of the timeline.
For more information, see Working with the timeline.
Finding a particular method in the call tree
- On the Tools menu, click Find.
The Find bar is displayed beneath the call tree. Type all or part of the method name you are looking for, and press Enter.
The first matching row in the call tree is highlighted.
Click Previous or Next to move between matching method names.
Waiting for synchronization
The call tree may display '(Waiting for synchronization)'. This means that a thread is waiting for another thread to finish.
If '(Waiting for synchronization)' is the only item in the call tree, it is likely that you are viewing the garbage collector thread only. To see all results, on the Display options dropdown menus, select All methods and either (All threads) (if your application ran multiple executables) or the name of your executable (if your application ran only one executable), and on the Timing options dropdown menu, select Wall-clock time.
SQL call and HTTP request timing
To see how long SQL calls and HTTP requests too, switch the Timing options to Wall-clock time.