WPF Application Start Up Time

Code profiling for .NET Developers

Moderators: StephenC, Alex.Davies, AndrewH

WPF Application Start Up Time

Postby mfreeman37 » Wed Oct 28, 2009 3:16 pm

When I run my WPF application in the ANTS Performance Profiler, it takes a very long time to start up. It takes roughly 4 times longer to start up in the profiler than it does in the debugger or from the console.

My main concern and reason for using the profiler at this time is to enhance startup time on my application, so this slowdown is making the use of the ANTS profiler useless in this case.

Is there some configuration that will help get my startup time to be more inline with what it should be?

Thank You

MEF
mfreeman37
 
Posts: 2
Joined: Wed Oct 28, 2009 3:09 pm

Postby Brian Donahue » Thu Oct 29, 2009 5:57 pm

Hi Matt,

I have noticed the same issue myself -- I think that the base reason for WPF startup being slowed down this noticably is that there are a lot of recursive methods. If you profile a WPF app, you will see some methods have a high hit count. The get_CurrentThread method will be in the hundreds of thousands, then the call graph shows some recursion in SubclassWndProc.

Recursive methods have historically caused a performance hit for profilers.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby mfreeman37 » Thu Oct 29, 2009 6:18 pm

Hi Brian-

How can I profile down into these methods?
Currently, the profiler just shows them collapsed without source.
I assume this is where the framework stuff is sitting.

Thank You for you help!
MEF
mfreeman37
 
Posts: 2
Joined: Wed Oct 28, 2009 3:09 pm

Postby Brian Donahue » Thu Oct 29, 2009 6:21 pm

I just went to the "grid view" so that I could easily sort on the methods with the largest hit count.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby StephenC » Mon Nov 02, 2009 12:16 pm

Matt,

if you want to see the collapsed methods then just change the display options - see the combo boxes.

By default it shows "Top down, methods with source"

Just change this to Top Down, any method.

Be warned though - the noise of showing all these methods will be large. I would select the region of interest and switch to the All Method grid and change the display settings there too.

S
StephenC
 
Posts: 306
Joined: Mon Oct 15, 2007 9:18 am
Location: Cambridge


Return to ANTS Performance Profiler 5

Who is online

Users browsing this forum: No registered users and 0 guests