Imagine that you have just had a User Acceptance Test (UAT), and your app has been reported as being "painfully slow" or "so slow as to be unusable". Now, as a coder, where do you start to improve the performance? More importantly, do you know how much your massive changes have improved performance - if at all?

Page Content

We recommend that you should always use a code profiling tool to measure performance gains whilst optimising your application. Otherwise, you are just flying blind and making subjective, unmeasured decisions. Instead, use a tool such as JetBrains dotTrace profiler. These will guide you as to how to best optimise any code that is lagging behind the pack. You can run this on both ASP.NET and Windows Forms Applications. The optimisation process is as follows:

Profile the application with Jetbrains dotTrace using the "Hot Spot" tab to identify the slowest areas of your application

Figure: Identify which parts of your code take the longest (Hot Spots)

Some parts of the application will be out of your control e.g. .NET System Classes. Identify the slowest parts of code that you can actually modify from the Hot Spot listing

Determine the cause of the poor performance and optimise (e.g. improve the WHERE clause or the number of columns returned, reduce the number of loops or use a StringBuilder instead of string concatenation)

Related rules

Do you feel this rule needs an update?

If you want to be notified when this rule is updated, please enter your email address:

Comments:

Acknowledgements

Help and improve these rules

Nothing great is easy. The SSW rules are a great resource for developers all around the world.
However it’s hard to keep rules current and correct. If you spot a rule that is out of date, please email or if you are cool tweet me,or one of the people in above acknowledgements.

Our experience

SSW's Consulting Services have delivered best of breed Microsoft solutions, for more than 1000 clients in 15 countries. With 30 consultants in 3 countries, SSW's developers are some of the best in the business, with many Microsoft Certifications, 5 MVPs and Microsoft Regional Directors.

For over 20 years, SSW's been delivering scalable and extensible custom SharePoint, .Net, Dynamic CRM and TFS solutions with the future in mind. Our solutions improve businesses bottom line, with real time savings and long term value. We will provide you with that competitive advantage you need.

How to get started

SSW will look at your Website Design
and Development needs and help you
design and implement an effective
Website.