If you are developing a WPF application, you know about the increased startup time compared to native applications. One of the reasons is the time needed for loading the CLR the first time it is used after a reboot, but there are a lot more aspects affecting the time until your application window is shown on the screen and fully functional. Although .NET 3.5 SP1 improved the initialization time noticably, it is worth to understand the pitfalls and to design your application for fast startup and initialization. The following links will provide you some insights information:
- MSDN: Application Startup Time
The amount of time that is required for a WPF application to start can vary greatly. This topic describes various techniques for reducing the perceived and actual startup time for a Windows Presentation Foundation (WPF) application
- MSDN: Optimizing WPF Application Performance
This section is intended as a reference for Windows Presentation Foundation (WPF) application developers who are looking for ways to improve the performance of their applications.
- MSDN: Improving .NET Application Performance and Scalability
This guide provides end-to-end guidance for managing performance and scalability throughout your application life cycle to reduce risk and lower total cost of ownership. It provides a framework that organizes performance into a handful of prioritized categories where your choices heavily impact performance and scalability success. The logical units of the framework help integrate performance throughout your application life cycle. Information is segmented by roles, including architects, developers, testers, and administrators, to make it more relevant and actionable. This guide provides processes and actionable steps for modeling performance, measuring, testing, and tuning your applications. Expert guidance is also provided for improving the performance of managed code, ASP.NET, Enterprise Services, Web services, remoting, ADO.NET, XML, and SQL Server.
- WPF Performance Blog: Improving WPF applications startup time
WPF applications are known to have slower coldstart time. Below are some suggestions and ideas that could help you to improve your WPF applications startup time in general and coldstart time in specific.
- Assembly Startup and Runtime Initialization
Book: Expert C++/CLI, by Marcus Heege
- MSDN Magazine: CLR Inside Out: Improving Application startup performance
as waiting for an application to start is frustrating to many users, focusing on your client application’s startup performance can greatly enhance your customers‘ first and lasting impressions of your handiwork. And because startup performance matters to users, it’s worth exploring the factors that impact it so you can avoid the most common mistakes.
- Splash Screen To Improve WPF Application Perceived Cold Startup Performance
When a WPF application is launched for the first time after reboot, it needs to access the disk to load many of Common Language Runtime (CLR) and WPF code pages that otherwise may be present in the OS memory manager’s standby list.
One of suggestions mentioned in that blog, was to add a splash screen that will show as-soon-as-possible and will be followed by the main WPF app window once the code on the start up path is executed. This will present the user with some quick UI and will improve the overall user-perceived responsiveness of your application.
This blog provides a basic sample that demonstrates how this can be done.
- SplashScreen Class Documentation
Documentation of a basic splash screen class available up from .NET Framework 3.5 SP1