.NET Profilers are a developer’s best friend when it comes to optimizing application performance. They are especially critical when doing low level CPU and memory optimizations. But did you know that there are three different types of profilers?
Traditional .NET profilers that track process memory usage, time spent per line of code and frequency of method calls.
Lightweight profilers or other tracing mechanisms that allow you to logically understand what your code is doing and understand performance at a high level.
Application performance management (APM) tools designed to monitor production servers.
All are very valuable but serve relatively different purposes and different types of performance profiling. Let’s explore the different types.
1. Standard .NET Profilers
These tools include CLR profiler products like Visual Studio’s .NET profiler, ANTS, dotTrace, SciTech and YourKit.
Most likely if you are using a profiler of some form, you are having a bad day. It usually means you are chasing some bad CPU or memory usage problems.
Adobe Photoshop cc Crack ’ve had my fair share of multi-day marathon profiling sessions trying to find obscure memory leaks. These tools are a lifesaver when you need them, but they are very resource intensive and slow you down when using them.
I would venture to guess that the vast majority of developers have never or very rarely use these types of profilers. These simply aren’t needed day to day for apps that a lot of developers create.
Traditional usage scenarios for a .NET profiler:
High memory usage: Profilers are extremely powerful when it comes to tracking down memory leaks and optimizing memory usage.
CPU usage is out of control: If your server CPU is extremely high and you have no idea why, a profiler may be your last resort to figure out why.
Proactive performance tuning: Optimizing CPU usage for some apps is a never ending job.
A standard .NET profiler works by using the .NET CLR profiling interface. This allows profiling the .NET MSIL bytecode at a low level to understand each operation your code performs. This enables them to show you the “hot path” within your code to see which methods are using the most CPU.
You can then typically drill down to even which line of code in your app is using the most CPU. This can be a huge lifesaver when you are having one of those bad days and need to urgently find the problem.
We proactively use the Visual Studio Profiler and ANTS to tune the performance of our Windows monitoring agent. Our goal is to add as little overhead as possible on the servers of our customers. We have also had to use them to chase down some weird memory leaks.