Published: 20 Nov 2008
By: Granville Barnett

We take a look at the new ANTS Profiler 4 from Redgate.

Contents [hide]


I was lucky enough to review the last version of ANTS Profiler little more than a year ago and was thoroughly impressed by how easy it was to use and its speed. On face value the predecessor to ANTS Profiler 4 looked very much like its rivals and in many ways ANTS Profiler 3 and the likes of Jetbrains’ dotTrace product were a little too alike.

The most encouraging thing about ANTS Profiler 4 is that it has gone above and beyond that of its predecessor and rivals in terms of how you can interact with and visualize the data collected from your profiling session. New features include a timeline, the ability to add counters, interactively querying portions of your code visually, and much more.

Before we delve into the actual review a quick reminder of the general services a profiler provides is required. ANTS Profiler like other profilers provides tooling to view hotspots within your application. The term hotspot refers to the methods or chunks of your program that the most time is being spent on. They also offer the ability to profile the memory consumption that your application consuming as well. Everything mentioned thus far in this paragraph ANTS Profiler 4 provides (and much more!).

Setting up a profiling session

Just like ANTS Profiler 3 setting up a new profiling session merely consists of a single page wizard, however in ANTS Profiler 4 you now have the option of adding Perfmon counters which is of great benefit. All counters that you select will be visible on the timeline which is discussed later.

Figure 1: Wizard for setting up a new profiling session

Wizard for setting up a new 

profiling session

The applications that you can profile in ANTS Profiler 4 include:

  • .NET desktop application
  • Windows Service
  • COM+ server
  • ASP.NET web app (both IIS and Cassini hosted)

Once you have decided on the application type to profile and selected the relevant counters you want to monitor then all you have to do is just hit the Start Profiling button.

The timeline

If you have ever used Perfmon before you will love the timeline. The timeline shows real-time values in the form of a graph. The counters you have selected for your profiling session populate the graph. Once your application has exited, or you have ceased profiling of the application manually you can then use the timeline to focus in on certain timeframes. I believe that this feature is the most valuable in the new ANTS Profiler product.

Figure 2: Timeline showing % of processor time

Timeline showing % of processor time

Figure 3: Adding additional counters to the profiling session

Adding additional 

counters to the profiling session

Figure 4: Timeline with additional counters

Timeline with additional counters

If you have a long running application then you will see the graph being populated in real-time which allows you to identify hotspots with ease.

Visualizing call graphs

Another great new feature in ANTS Profiler 4 is the ability to visualize call graphs and drill down into those graphs.

Figure 5: Drilling down into a call graph

Drilling down into a call graph

This feature is particularly useful as it can make pretty complex call stacks like that of quick sort easy to navigate. The code I profiled was a call to quick sort on a list containing one million unordered random integers. While the call stack was fairly deep using this new feature made it simple to traverse the calls.

Another pretty cool feature of the call graph visualizer is that you can export the diagram as several formats including a PDF that is vector not bitmap based so you can view the graph in a rich medium.

Other ways to view your data

Thus far we have covered the cooler features of ANTS Profiler 4 and now we will go over the features that you will probably use the most in terms of just getting the raw data about your application profile.

Although the call graph visualizer is indeed very sleek you will still probably spend the majority of your time using the call tree and methods grid. The call tree view is the default view for a profiling session.

Figure 6: Call tree view

Call tree view

The methods grid gives a flat view of the methods called within the profiling session and their attributed time cost and so on.

Figure 7: Methods grid

Methods grid

Other improvements

I remember in ANTS Profiler 3 having several issues when profiling recursive algorithms. These algorithms weren’t operating on a large data set yet the profiler seemed to take a significant amount of time to profile the application. In ANTS Profiler 4 this problem seems to have disappeared and in general I have found the new version to be a lot quicker than ANTS Profiler 3.


While reviewing software is very much a subjective affair I can without doubt say that ANTS Profiler 4 is the most rounded .NET profiler I have ever used. Moreover, the new features added to the fourth incarnation of the product have brought with it greatly improved usability and performance gains. Profiling applications that will be released in some shape or form to the public is an absolute must and ANTS Profiler 4 is a great tool to use for such a task. I cannot recommend this product enough; it is simply the most comprehensive of its kind for profiling .NET applications.

<<  Previous Article Continue reading and see our next or previous articles Next Article >>

About Granville Barnett

Sorry, no bio is available

This author has published 32 articles on DotNetSlackers. View other articles or the complete profile here.

Other articles in this category

Android for .NET Developers - Location and Maps
In Windows Phone and iOS getting the current position of the device in terms of latitude and longitu...
Android for .NET Developers - Using Web Views
In this article, I'll show a native app that contains a web-based view. The great news is that HTML ...
Android for .NET Developers - Building a Twitter Client
In this article, I'll discuss the features and capabilities required by an Android application to ta...
Developing a Hello World Java Application and Deploying it in Windows Azure - Part II
In this article we will see the steps involved in deploying the WAR created in the first part of thi...
Ref and Out (The Inside Story)
Knowing the power of ref and out, a developer will certainly make full use of this feature of parame...

You might also be interested in the following related blog posts

November's Toolbox Column Now Online read more
October's Toolbox Column Now Online read more
September's Toolbox Column Now Online read more
August's Toolbox Column Now Online read more
July's Toolbox Column Now Online read more
Load Testing vs. Profiling read more
An Overview of Wrox Series read more
AjaxView Javascript profiling read more
Due Diligence and Code Comments read more
Some Early Thoughts on My Book read more

Please login to rate or to leave a comment.