DebugView - Free Simple Tool To Quickly Identify Performance Problems

 Alik Levin   DebugView is well known free tool from Systinternals (Microsoft). Vast majority of developers is aware of its existence. Nevertheless, I've decided to write this post following my practice of journaling my technical accomplishments during engagements with the customers. Yesterday the tool helped us identify serious performance problem without installing profiler or even taking memory dumps.

Customer Case Study

The customer complained about "bad performance" of web pages. The application was pretty simple one - ASP.NET pages accessing SQL Server for simple queries. The SQL Server was installed on the same machine where ASP.NET app resided. The pages took up to ten seconds to render.

Analysis

After quick code review we found out that the code called function that traversed all server controls using recursion. This function was called several times during the page lifecycle. I presented the team with my assumption that this code is a potential culprit of the "bad performance". The opposite assumption I faced was "but there is only so few controls on the page, it cannot consume too much time."

We decided to add single line of code to the function in question:

System.Diagnostics.Trace.WriteLine ("Calling Recursive Function");

Then we fired up DebugView and ran the page.

The team was amazed by what DebugView presented interactively. "Calling Recursive Function" line kept piling up on and on. Each call took from 50 to 100 milliseconds but when multiplied to overall number of calls (~700) it gave us clear understanding what caused the performance hit.

Conclusion

Instrument your application properly - simple yet powerful technique that helps you avoid calling expensive consultants onsite.

Instrument your application and surprise your end users by high performing application.

Related Materials

 

This post is made with PracticeThis.com plugin for Windows Live Writer

Published 11 November 08 05:12 by alikl

Comments

# Maor David-Pur said on November 14, 2008 7:22 AM:

Nice...

Usually bad performance is result of very bad programming...

# alikl said on November 14, 2008 7:43 AM:

If you mean "coding" by "programming" then there is more to it.

Bad performance caused by improper design, improper coding, and improper deployment.

Coding is just one part, there is more to it.

Perf bug may be introduced throughout the whole development lifecycle.

That is why I am big fan of PDL - performance development lifecycle.

# Jimmy May said on November 14, 2008 11:44 AM:

Nicely done; spoken like a true architect.

# alikl said on November 15, 2008 1:41 AM:

Thanks, Jimmy!

You are very encouraging ;)

New Comments to this post are disabled

Search

This Blog

. My Personal Blog .

.Net Performance How To's

.Net Security How To's

Design Patterns

Impactful

Lifecycle Phases

Popular

Tools

Syndication

Page view tracker