Home
› Learn
› What's New for Performance Profiling Tools for WPF
What's New for Performance Profiling Tools for WPF
The WPFPerf tool comprises of a suite of performance profiling tools that allow
you to analyze the run-time behavior of your WPF application and point to potential
performance bottlenecks. We've given WPFPerf a facelift, added some exciting new
features, and fixed a few bugs. Read below to learn about some of the improvements
in this update.
Much Improved "Visual Profiler" Tool
The Visual Profile tool now provides the following:
-
Search
Search box that provides the ability to search element in the
application's Element Tree. All elements found in the Element Tree are highlighted
in Yellow. Elements can be searched either by their Type or Name.
-
Hotpath
User can now Right Click / Expand Hotpath on an Element Tree, the
tree will expand to show the element in the sub-tree that consumes the most
amount of CPU in that sub-tree.
-
Elements CPU Usage
As user expands the Element Tree (e.g. by using the Hotpath
feature from above), elements that (Exclusively) consumes CPU time are highlighted in Red. The
intensity of the Red highlighting corresponds to the percentage of CPU usage.
-
Tinting the Target Application
Using the Overlay Window button, user
can view the Selected and Hotpath sub-tree elements in their target application.
If the Overlay Window button is depressed, then:
- Selecting an element in Visual Profiler’s Element Tree will draw a yellow rectangle on that same element in the target application.
- Hotpath elements are tinted in Red in the target application. The intensity of the Red tinting in the target application corresponds to the percentage of CPU usage.
Here is an example of how target application may look:
Note: Enabling this feature will slow the target application performance.
In addition, tinting the target application uses Layered Windows. It is recommended
that users follow this blog to make to obtain latest QFEs (or use XP SP3 or
Vista SP1)
-
Live Preview
If the "Live Preview" button is depressed,
then in Visual Profiler a live representation of the selected Element sub-tree is
drawn on the bottom left. If the "Live Preview" button is not depressed,
then a static image of the sub-tree is displayed. In both cases, the image will
change if another Tree Element is selected.
Note: Enabling this feature will slow the target application performance.
-
Splitter control
Splitter control allows user to adjust the various display areas (E.g. the Element Tree & Element Information areas).
-
Graph Duration Slider
Slider that allow user to change the amount of history data collected from 4 seconds up to 1 minute.
-
Expander controls
Expander controls to allow user to remove un-wanted clutter from the screen.
-
Element Tree View
To remove clutter and improve performance, using the View menu you can control what information is displayed on the each node in the Element Tree.
Much Improved Perforator Tool
The Perforator tool now provides the following:
-
Improved UX
Perforator has a more intuitive and richer user interface.
-
History Data
- Perforator now shows History Graphs of Frames-Per-Second, Direct Rectangles Addition Rate, HW and SW IRT count and Video Memory Usage.
- Graph Duration slider that allow user to change the amount of history data collected from 3 seconds up to 1 minute
- Capture Start/Pause button that allows user to pause and re-capture Perforator performance data.
- The History Graph value axis (Y-Axis) is now auto-adjusting.
-
Detect SW Rendered Bitmap Effects.
New checkbox was added to tint the target application elements that use SW rendered legacy Bitmap Effects.
For example, in the below application, the top button is decorated with OuterGlowEffect Bitmap Effect. Since this effect is not HW accelerated the Button is tinted in Red.
The bottom Button is decorated with DropShadow Bitmap Effect which is HW accelerated (DropShadow is now HW accelerated in .Net 3.5 Sp1), and therefore is not tinted with Red.
Known Limitations:
- You must force the target elements to redraw itself after you enabled the checkbox for you to see the red tint. E.g. hover over with the mouse, if it is standard button.
- You still need to launch Perforator before you launch your app.
General Improvements
- A large number of bug fixes
- Ability to attach to XBAPs in addition to Standalone WPF apps
- An improved "Add Tool" dialog now allows user to select more than one tool at a time.
- UI improvements to the "Select Process" dialog. This allows user to select the target application to profile.
- UI improvements to the "Launch Process" dialog
Known Issues & Caveats
-
General
Try to avoid using more than one tool (e.g. Visual
profiler & Perforator) at the same time to profile the same app as it will
decrease the application performance.
-
Perforator/ Detect SW rendered Bitmap Effects
When you set
"Detect SW rendered Bitmap Effects", in order for the Red tint to
show, you must force the target elements to redraw itself
-
Perforator/ Overlay Window
Tinting the target application
uses Layered Windows. It is recommended that users follow this blog to make
to obtain latest QFEs (or use XP SP3 or Vista SP1)
-
Perforator/ Live Preview
Live Preview uses Visual brush, so
if you also use Perforator to profile the same app, you may see that the HW
IRT count increases by 1.
-
Perforator/Visual Profiler
You can attach to an XBAP
(by attaching to PresentationHost.exe), but you may not able to launch
an XBAP.
-
Perforator/Visual Profiler
You must launch Perforator before you launch your app.
Download
The WpfPerf tool is now included in the Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1.
After you install the SDK, in the Start menu under “Microsoft Windows SDK v7.0”/ “Tools” click to “Install Windows Performance Tool Kit”, you then should see the “WPF Performance Suit” on the Start menu.
Archive
The previous version of WpfPerf can be downloaded
here; documentation is
here.