views:

941

answers:

5

Sometimes I create some quick personal projects using c# with windows forms or wpf. I have noticed that depending of the kind of application, looks that managed applications take 2x or 3x more time to start compared with native applications.

It's does a "Quick Notes" application don't so... "quick". :-(

There are some technique to speed up the initialization of winforms/wpf applications?

+2  A: 

.NET 3.5 SP1 does tend to make start up a little quicker. Also see a series of blog posts on putting up a splash screen (in native C++) while starting the WPF application at the Logos Blog.

dpp
+7  A: 

Check out NGen

Also, if you are loading lots of data on load, move it to another thread and show an indicator or something (while it's loading) so at least the form pops up quickly, even if it takes a little longer for the actual data to load.

scottm
+2  A: 

.NET 3.5 SP1 also now includes the ability to create a fast SplashScreen without using C++

Hades32
Do you have a link on this? How do we use this?
ZeroBugBounce
+1  A: 

You might also want to consider moving processing off to worker threads. When your app starts load the root UI, but not the data - rather load the data async (and create pad windows etc. as each data item comes in).

Jonathan C Dickinson
A: 

.NET apps made for .NET 3.0+ work much better on newer Windows Vista, 7...I think in few years time the diffrence between managed and unmanaged code in terms of performance will unnoticeable.

milous