A lot of effort has been put into making the performance of the profiler as good as possible, but, nonetheless, it is an intrusive profiler. Most features of the profiler come with a performance cost. This section contains information about the cost associated with some features, most of which are enabled by default.
• Collect real-time data
The main performance cost of this feature is the fact that a full heap walk is performed at every garbage collect, even generation #0 and generation #1 collects. If the profiled process has a lot of instances, or if a lot of generation #0 collects are performed, then disabling this feature will help increase the performance. Disabling this feature also allows delayed instance cleanup to be enabled, giving even better performance.
• Disable inlining
Normally, inlining of methods is disabled, in order to present more accurate allocation call stacks. This comes with a performance cost. To further increase the performance of the profiled process, do not disable inlining.
• Dispose tracker
The dispose tracker adds very little overhead to the profiler. Some extra code is injected into the Dispose and Finalize methods of classes, but the code is very short and should not affect the performance of the profiled process.
• Track heap utilization
Tracking heap utilization has a performance cost when an instance is garbage collected, and it also increases the memory usage of the profiler and the profiled process. Heap utilization tracking is an advanced feature that is disabled by default. You should only enable it when trying to optimize the memory usage pattern of your application.
• Collect instance data
Collecting instance data has no effect on the performance of the profiled process, but collecting heap snapshots may take a longer time. If the time it takes to collect a heap snapshot is too long, try to reduce the number of instances for which data are collected, or disable instance data collection completely. For more information about instance data collection, see Instance Data Collection Form.
• Unmanaged resources tracker
The resources tracker adds a significant overhead to the profiled process. Unless unmanaged resources are actually investigated, it is recommended that the resource tracker be disabled.
All features are enabled and disabled using Session Settings. Any changes in these settings do not affect any ongoing profiling session. Changes for “Instance data collection” can be made on an ongoing profiling session and will affect the next heap snapshot.