Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cold Start Performance WPF

I am using the performance analysis tools within Visual Studio to evaluate a rather large and complex WPF application I am working on. I've been able to get cold start time reduced significantly by lazy loading most of the user controls that previously I just loaded on the application start however I am still seeing the bulk of my CPU cycles spent within the assembly 'PresentationFramework.ni.dll'. This doesn't help me figure out what the root cause is because all it says is that the time is spent on a particular user control's 'InitializeComponent' (i.e. XAML parsing) or Window.Show (i.e. XAML parsing).

My question is this: how can I get more granular insights into what specific XAML elements are causing the performance issue?

I am using Visual Studio 2013 and running Windows 8.1. I used to use the old Windows 7 SDK WPF Performance Toolkit that showed a really useful rendering time display that change the color on screen when a particular UIElement was re-drawing but I can't seem to find the same tool that runs on Windows 8.

like image 493
markti Avatar asked Apr 30 '14 20:04

markti


1 Answers

I suspect the user control has a "deep" visual tree,so it spends time initialising. I did face this myself and used a workaround to load the user controls in background as soon as the application starts.hope this helps.

like image 122
amolDotnet Avatar answered Oct 27 '22 20:10

amolDotnet