Improve Code Performance with the VSTS Code Profiler
The results of profiling a C++/CLI Windows forms application are shown in Figures 7 and 8. The results in Figure 7 will be available when the Collect .NET object allocation information checkbox is selected, and Figure 8 is available when is selected. As the figures show, the information is displayed by type, and while this can be useful for diagnosing general issues with over-allocation of a type, per-type allocation and lifetime information is a lot less useful than per-object statistics that tools like the SciTech MemProfiler.
Figure 7: Selecting the Collect .NET object allocation information checkbox.
Figure 8: Choosing Also collect .NET object lifetime information.
Improvements in the performance and features of the VSTS profiler that come with the VSTS 2008 release make the profiler a very capable performance-tuning tool for the C++ (and other VSTS language) developer. The use of two profiling modes makes the profiler capable of scaling to the largest of C++ code bases, and finding the most obscure performance problem can be accomplished using the wealth of information produced by instrumentation profiling. Developers who haven't settled on a preferred profiler will be well served by giving the VSTS Developer Edition Profiler a spin and seeing how well it fits their performance tuning needs.
About the Author
Nick Wienholt is an independent Windows and .NET consultant based in Sydney. He is the author of Maximizing .NET Performance and co-author of A Programmers Introduction to C# 2.0 from Apress, and specialises in system-level software architecture and development, with a particular focus of performance, security, interoperability, and debugging.
Nick is a keen and active participant in the .NET community. He is the co-founder of the Sydney Deep .NET User group and writes technical articles for Australian Developer Journal, ZDNet, Pinnacle Publishing, CodeGuru, MSDN Magazine (Australia and New Zealand Edition) and the Microsoft Developer Network. An archive of Nick's SDNUG presentations, articles, and .NET blog is available at www.dotnetperformance.com.
In recognition of his work in the .NET area, he was awarded the Microsoft Most Valued Professional Award from 2002 through 2007.
Page 3 of 3