Benefits: Tuning your .NET application

The situation

Tuning your .NET application is primarily about speed, code quality and documentation. While all of these issues are important to consider throughout the development process, most people focus on them towards the end of a project.

Simplistically, we can consider the development of a .NET application to be a three stage process:

  1. Create the code that will allow you to implement the functionality you are trying to achieve.
  2. Test and debug the code, which will almost certainly involve several rewrites of the most challenging parts of your code.
  3. Tune your .NET application.

Although the order of this list is broadly correct, in reality most development flits between all three areas on a daily basis. However, in aggregate, development progresses with most activity in code creation initially, debug and test in the middle, and tuning at the end.

Key challenges

How we can solve it

At Red Gate we recommend the following approach to .NET tuning:

Speed

For tuning the speed of your .NET application, use Red Gate's ANTS Performance Profiler. Generally, it makes sense to focus on the areas you identified in Stage 2, above. ANTS Performance Profiler will help you understand which parts of your application are worth tuning, right down to the lines of code to tune. More detail about how to find slow lines of code with ANTS Performance Profiler can be found on our product pages. Although you can, and should, use ANTS Performance Profiler during the test and debugging phase, tuning is an important use for a profiler.

To find out more about tuning the speed of your .NET application using ANTS Performance Profiler, please visit our ANTS Performance Profiler product pages.

Code quality

.NET code quality is best assessed via a code review – where team members look at, and comment on, the actual code. However, before you put yourself through that, it is well worth using FXCop which " … is a code analysis tool that checks .NET managed code assemblies for conformance to the Microsoft .NET Framework Design Guidelines. It uses reflection, MSIL parsing, and callgraph analysis to inspect assemblies for more than 200 [code] defects." By checking for common problems automatically, your code review is more likely to focus on key issues rather than spelling mistakes.

Documentation

Although it is often said you should produce your documentation at the end, this makes for a whole load of additional, unnecessary work – essentially because Stage 2 often involves repeated rewriting, reordering and refactoring. We recommend doing the documentation while the code is still fresh in your mind. We've not found any automatic documentation tools that are worth using.

Benefits of our solution

Help

Pricing
from $395
ANTS Performance Profiler is available as a standalone tool, or as part of the .NET Developer Bundle.



Volume discounts apply.
Got a question?
0800 169 7433
Download

Try a 14-day fully functional free trial of ANTS Performance Profiler.

.NET Developer Bundle
.NET Developer Bundle3 tools that make developing quality software easy


Contains:

Find out more:

Awards
  The Code Project Members Choice Winner 2011   Visual Studio Magazine Readers Choice Winner 2009   Microsoft Gold Certified Partner Award