C# WPF Very slow application launch

c#, optimization, performance, wpf

Solution

Look at the article mentioned in the comments above.

I would suppose it is 8, (Authenticode), it depends on what assemblies you are referencing

Problem

I've wrote a simple `.net WPF` application(contains only 2 small windows), but its launch is too slow - about 10-20 seconds! Profiler says: - `Main->RunInternal`(56%) - `Main->RunInternal->ctor->LoadBaml`(32%) Biggest part of application load time - is body of `Main->RunInternal` function, this isn't my function and i don't know what they makes. Can their execution time somehow be optimized? Loading Baml markup it takes 32% of all time, but my program have only 3 XAML files and they are containing less than 100 lines of code. Why does this action take so long? Before asking I have read and tried these tricks, but they didn't help me: - WPF application slow on startup - http://msdn.microsoft.com/en-us/library/cc656914.aspx So, how can I speed up the start time of my application? Thanks. PS. I've tested this program on two similar computers and the result is a same.

Original source

Related problems