DebugView - Free Simple Tool To Quickly Identify Performance Problems
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
- Use Sysinternals DebugView To Diagnose The Application.
- ASP.NET Performance By Design: Takeaways From PDC
This post is made with PracticeThis.com plugin for Windows Live Writer
Comments
- Anonymous
November 13, 2008
Nice...Usually bad performance is result of very bad programming... - Anonymous
November 13, 2008
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. - Anonymous
November 14, 2008
Nicely done; spoken like a true architect. - Anonymous
November 14, 2008
The comment has been removed