ANTS Profiler
Latest version: 4.3
Notes & articles
Performance profiling with ANTS 4: tips for ANTS 3 users
If you are already familiar with the performance profiling features of ANTS Profiler 3, you may be wondering how to perform the same tasks or find an equivalent feature in ANTS Profiler 4.
ANTS Profiler 4 represents a fundamental change to the performance profiling workflow, so certain performance profiling features from ANTS Profiler 3 are no longer relevant, or are accessed in a different way in ANTS Profiler 4.
This article answers common questions that you may have as an experienced ANTS Profiler 3 user.
Frequently asked questions
How do I ignore application startup activity?
How do I reset the profiler and leave my application running?
How do I compare profiling results?
How do I explore the method hierarchy?
How do I exclude sleeping / blocking time?
How do I change the unit for method execution times?
How do I show the ten slowest lines of code?
How do I show the ten slowest methods?
How do I show the profiling results for a particular thread?
How do I apply a custom filter?
How do I start ANTS Performance Profiler with command-line switches?
How do I ignore application startup activity?
With ANTS Profiler 4, performance profiling is always started automatically when you start your application. You cannot delay profiling until after your application has started as you can in ANTS Profiler 3.
Instead, you can exclude start-up activity from the profiling results by dragging a region on the time line that excludes the start-up period.
See Working with the time line for further details.
Note: ANTS Profiler 4 introduces much less overhead than ANTS Profiler 3. The application you are profiling should run more quickly while using ANTS Profiler 4 as compared to ANTS Profiler 3, reducing the impact of profiling startup activity. For the best profiling performance, set the profiling mode to Method level timings; only methods with source (fastest). (See Setting up and running a profiling session for further details.)
How do I take a snapshot?
ANTS Profiler 4 removes the need for you to take snapshots when performance profiling. Instead, the time line in ANTS Profiler 4 enables you to select any time period during the execution of your application, and immediately display the relevant profiling results.

The time line displays Windows performance-counter values and event markers, along with execution time. This makes it easy for you to identify interesting points during the execution of your application, select the required time period, and display profiling results.
You can then bookmark any period you selected on the time line, enabling you to compare results from different time periods.
See Working with the time line for further details.
Note: The time line is available only when performance profiling - memory profiling still requires you to take snapshots.
How do I disable profiling?
You cannot disable performance profiling in ANTS Profiler 4 without also stopping the application that is being profiled.
Rather than disabling performance profiling, you can exclude periods of activity from the profiling results by selecting the appropriate region on the time line.
See Working with the time line for further details.
How do I reset the profiler and leave my application running?
With ANTS Profiler 4, you cannot reset the profiler (which discards results that have already been collected) without also stopping the application that is being profiled.
Rather than resetting the profiler, you can exclude periods of activity from the profiling results by dragging a region on the time line that excludes this activity.
See Working with the time line for further details.
How do I compare profiling results?
To jump between profiling results for different time periods within the same profiling session, create bookmarks on the time line, and select a bookmark to display the relevant results set.
See Working with the time line for further details.
To compare profiling results from different profiling sessions, start a second instance of ANTS Profiler 4, and open a previously saved result set. You can then switch between ANTS Profiler 4 instances to compare the profiling results.
How do I explore the method hierarchy?
In ANTS Profiler 4, the call graph shows calling relationships between methods. The call graph performs a similar role to the hierarchy tab in ANTS Profiler 3, but enables you to analyze multiple levels of the hierarchy at once.
The call tree shows calling relationships as individual stack traces traversed during profiling of your application. Rather than focusing on a particular method (like the call graph), the hottest stack traces are displayed first (that is, those sequences of method calls that took the longest time to execute).
See Working with the call graph and Working with the call tree for further details.
How do I exclude sleeping / blocking time?
With ANTS Profiler 4, timing data in performance results can be calculated to exclude the time due to a process sleeping or being blocked. This may give you a more realistic view of where performance problems lie within your code. (It was not possible to exclude sleeping and blocking time from the performance profiling results using ANTS Profiler 3.)
To exclude sleeping and blocking time, ensure that the timing setting in the display toolbar is set to CPU time, rather than Wall-clock time.

This setting applies to the call tree, methods grid, and call graph.
How do I change the unit for method execution times?
In ANTS Profiler 4, method execution times are displayed as percentages by default. To change the unit, on the View menu, click Percentages, Ticks, Milliseconds, or Seconds.
ANTS Profiler 3 displays method execution times in seconds only.
How do I show the ten slowest lines of code?
With ANTS Profiler 4, you cannot directly list the ten slowest lines of code.
However, the source-code pane now includes a "heat map" to the right of the vertical scroll bar.

This indicates the position of the slowest lines of code within a particular source file. You can click the bars on the heat map to jump directly to the relevant line of source code, or move your mouse pointer over individual bars to see the line number and timing data for that line.
How do I show the ten slowest methods?
With ANTS Profiler 4, the methods grid enables you to sort methods by Time or Time With Children and see the slowest methods at the top of the grid. There is no Summary pane in ANTS Profiler 4.
See Working with the methods grid for further details.
How do I show the profiling results for a particular thread?
Use the threads list on the display toolbar to choose a specific thread. Only profiling results for the selected thread will be displayed.

The threads list also shows separate processes. If the profiling results include any child processes, these are also listed along with their related threads.
You can specify a thread or process to display when viewing the call tree or the methods grid.
How do I apply a custom filter?
ANTS Profiler 3 included custom filters that you could use to specify which classes and methods were profiled during a particular performance profiling session.
ANTS Profiler 4 does not support custom filters. The overhead introduced by ANTS Profiler 4 is considerably lower than the overhead introduced by ANTS Profiler 3, so it is no longer necessary to apply custom filters before starting a profiling session.
With ANTS Profiler 4, to restrict the results displayed in the methods grid after profiling, type a method or class name in the Find box. Results are filtered as soon as you type.
How do I start ANTS Performance Profiler with command-line switches?
There are no command line switches for the ANTS Performance Profiler 4 application.
For memory profiling, the ANTS Memory Profiler 4 application supports command line switches. Click here for further information.
Was this article helpful?
ANTS Profiler
- Enabling logs to track the profiling session
- Changing the interprocess communications ports in version 4
- Double hit counts occurring on one line
- System.EntryPointNotFoundException (Versions: 3,4 only)
- Version 3.0 Unhandled startup exception on Windows Vista
- Version 3 add-in grayed out on non-English Visual Studio 2005 and 2008
- Methods in (ASCX) web controls may not appear
- Failed to CoCreate Profiler error profiling a Windows service
- Multiple-core portable computers may show inflated times (version 3)
- No .NET methods were profiled on web application
- ANTS Profiler code instrumentation method
- Profiling a single assembly in version 3
- Filtering results by individual thread
- Add-in fails to load when using RunAs to start Visual Studio as another user
- Profiling unit tests using Nunit
- Can I profile Compact Framework applications?
- Profiling a SharePoint 2007 Web Part
- Profiling an assembly in the Global Assembly Cache (GAC)
- Additional hidden statistics in the results grid (version 3)
- Multiple floating ANT icons in Visual Studio (version 3)
- ANTS Profiler overhead adjustments
- Profiling IIS web applications that need to run under the SYSTEM account
- Profiling a web application hosted in IIS on a fixed TCP port
- Add-in 'Object Reference not set to an instance of an object' error
- Profiling client-side XBAP .NET applications
- ANTS Profiler prompts for location of source code which is not your own source code
- ANTS menu remains in Visual Studio after uninstall of ANTS Profiler
- Profiling a web application needing to run as the Network Service account
- Abnormal termination caused by .NET 2.0 critical finalizer threads
- Cannot start COM+ application via Remote Desktop
- Fast mode and memory profiling options unavailable
- Finding the overall time taken to execute a thread
- Running an IIS application pool as a named identity
- IIS web application always loads default website
- Profiling BizTalk applications
- Profiling Microsoft Office managed-code add-ins
- The system cannot find the file specified
- Error Stopping IISAdmin profiling IIS web application on Windows XP
- ANTS Memory Profiler total size of all objects does not match the memory footprint of an application
- Lines of source code do not align with hit count, time data in version 3
- Creating a global debugging symbols (PDB) directory
- Profiling a SharePoint site collection
- Using the add-in to profile solutions containing more than one project
- Methods may be missing on multi-core systems in version 3
- ASP .NET 1.x application recycling causing incomplete results
- Ambiguous site selection message when profiling IIS applications
- Application recycling causes incomplete results and other errors when profiling ASP .NET
- Profiling WCF services hosted in IIS
- Cannot profile IIS 6 web application on port lower than 1024
- (version 5) Support for profiling Silverlight applications
- Couldn't open metabase error when profiling ASP .NET hosted in IIS
- Failed to coCreate Profiler on ASP .NET web application
- HTTP error 404.17 profiling ASP .NET 1.1 on IIS 7
- Performance counters missing from results
- Isolating single ASP .NET pages in ANTS Profiler results
- Missing hits for lines in the source code view
- ANTS Profiler restarts IIS
- Showing the amount of time taken for a method in one particular thread
- Common ASP .NET memory issues
- Please specify a valid URL message profiling ASP .NET
- Times on individual lines do not add up to method time
- Manually installing the add-in
- Error starting services running as "Local Service"
- Explanation of "thread blocked" methods in ANTS Profiler
- Call graph percentages do not add up exactly
- Operation could destabilize the runtime error profiling ASP .NET
- IIS ceases to work after profiling web applications
- Access to the Temp directory is denied error profiling web applications
- Problems with ANTS Visual Studio integration
- Unable to coCreate Profiler error profiling any application
all products
- Some Red Gate products identified as containing a trojan by Anti-Virus software
- Activation may fail with Unknown Error -1
- Product uses web help although a CHM file is available locally
- Argument exception resulting from missing environment variable
- Check for updates may fail when used through proxies
- 'Unidentified Publisher' error when repairing or uninstalling
- Licensing activates product as standard edition
- Moving Red Gate software products to another machine
- Red Gate tools log locations
- The application UI opening slowly when there is no internet access
ANTS Profiler
- Getting help offline
- Finding memory leaks using ANTS Profiler
- Identifying root objects with ANTS Profiler
- Performance profiling with ANTS 4: tips for ANTS 3 users
- How to profile a desktop application that hosts the .NET runtime (ANTS Profiler 3)
- How to profile the performance of a single .NET assembly (ANTS Profiler 3)
- Profiling ASP.NET applications (ANTS Profiler 3)
- How to reduce the number of topics you see in the "All objects" panel (ANTS Profiler 3)
- ANTS Profiler release notes - version 4.xx
- Why can't ANTS Profiler find my source code? (ANTS Profiler 3)
all products
- Red Gate product acknowledgements
- Activating your products
- Activating your products
- Red Gate bundle history
- Check for updates
- Troubleshooting Check for Updates errors
- Current versions
- Deactivating your products
- Installing Red Gate products from the .msi file
- Requesting additional activations
- Serial numbers for bundles
- Reactivating using a different serial number
- Extending your trial
- Finding your serial numbers
- Moving a serial number from one computer to another
- No response received for manual activation
- Licensing and activation resources
- Licensing and activation resources
- Troubleshooting licensing and activation errors
- Licensing and activation FAQs
- Red Gate tools log file locations
- Download old versions of products
- Download product prerequisites & utilities
- Support & upgrades
- Upgrading your software
- Upgrading FAQs

Using ANTS Performance Profiler