6

My wpf program has a strange problem regarding the startup performance on different computer with same specs. One computer loads my program less than a second. Another computer with the same spec loads 10+ secs.

With the help of Visualstudio performance profiler, I notice that two computers loads the program differently! which is so strange.

My problem is basically the same as this post: C# WPF Very slow application launch

The performance profiler on the "fast" computer(I mean start the program fast) shows that the program starts with System.Windows.Application.Run(), whereas the "slow" one shows that it starts with System.Windows.Application.RunInternal(...)

With the additional "internal" the boots time increased 10 times even though two computers are of the same spec and the source code are the same. (Actually, it is just plain mvvm light WPF start file)

Any ideas?

Community
  • 1
  • 1
user2127480
  • 4,623
  • 5
  • 19
  • 17
  • 4
    `Run` calls into `RunInternal`, so I think that's a red herring. – Kent Boogaart May 17 '13 at 09:06
  • Probably this [SO post](http://stackoverflow.com/questions/7610009/wpf-warm-appdomain-startup-performance-application-runinternal-xamlreader-load) is going to help you. It's actually not a real answer, but it illustrates some measures how the application start up can be optimized. – DHN May 17 '13 at 09:06
  • @KentBoogaart I know Run calls RunInternal. But it seems the slow one is calling RunInternal directly instead of calling Run() at first hand. – user2127480 May 18 '13 at 09:39

3 Answers3

0
  1. Log not-caught exceptions (in app level).
  2. See if the users on both computers have same level of authorizations (both are admin i.e.; or rather are not).

That should help.

Kaveh Shahbazian
  • 13,088
  • 13
  • 80
  • 139
0

The other thing to check may be anti-virus. Is one machine running real-time AV and the other not? Are both logged in users members of the same groups? Are both machines in the same OU?

Jen
  • 41
  • 2
0

Check in both the computer what are the services running. Check your both CPU Usage in two scenario by running your application and after closing your application.

Sivam
  • 1,099
  • 3
  • 12
  • 25