Can ANTS Profiler profile the performance of WPF rendering?
jameshurst
Posts: 2
Can ANTS Profiler profile the performance of WPF rendering?
For example, I'm developing a WPF application that draws waveforms for a medical-diagnostics display. I use low-leve drawing visuals to represent the waveform itself, which is shown in the Window packaged within a scrollviewer. And it is waaaay too slow.
But ANTS Profiler (AP) seems to only profile the initial startup, showing a very quick app. The slowness (to the user) is when he tries to scroll the view left or right, either with mouse-click or from keyboard. It takes seconds for it to respond (needs to be at least 4/second to feel responsive). But AP does not seem to give any indication of where that time is going.
I would think this is because it is the WPF infrastructure that is taking it's time, since my method that actually creates the drawing visuals from the array of data-points, is not called again to re-render the waveform on the screen. Once it's constructed, it is then up to WPF itself to move it around, resize it, scroll it, etc. So my application code is not even getting called. But the user is still seeing a huge annoying time-lag, and the need to somehow pinpoint where the time is going, and how to increase performance, is crucial. Or, even just to be able to measure the time-lag between hitting the Page-Down key, and when the display as finished it's scrolling. So that I then have a numeric value to tune against.
Is there a way to apply AP to this scenario, or.. any advice on how to go about this?
I'm running Windows XP Pro, Visual Studio 2008 with the SP1 beta, .NET 3.5 (with SP1 beta).
Thank you!
James Hurst
For example, I'm developing a WPF application that draws waveforms for a medical-diagnostics display. I use low-leve drawing visuals to represent the waveform itself, which is shown in the Window packaged within a scrollviewer. And it is waaaay too slow.
But ANTS Profiler (AP) seems to only profile the initial startup, showing a very quick app. The slowness (to the user) is when he tries to scroll the view left or right, either with mouse-click or from keyboard. It takes seconds for it to respond (needs to be at least 4/second to feel responsive). But AP does not seem to give any indication of where that time is going.
I would think this is because it is the WPF infrastructure that is taking it's time, since my method that actually creates the drawing visuals from the array of data-points, is not called again to re-render the waveform on the screen. Once it's constructed, it is then up to WPF itself to move it around, resize it, scroll it, etc. So my application code is not even getting called. But the user is still seeing a huge annoying time-lag, and the need to somehow pinpoint where the time is going, and how to increase performance, is crucial. Or, even just to be able to measure the time-lag between hitting the Page-Down key, and when the display as finished it's scrolling. So that I then have a numeric value to tune against.
Is there a way to apply AP to this scenario, or.. any advice on how to go about this?
I'm running Windows XP Pro, Visual Studio 2008 with the SP1 beta, .NET 3.5 (with SP1 beta).
Thank you!
James Hurst
Comments
When it comes to the performance of the graphical elements of the Presentation layer, though, Microsoft has made some perfomance analysis tools that may be more relevant. They are listed on their website.
I hope that you find these tools helpful as additions to the information that you get from ANTS Profiler.