![]() Fewer assemblies also mean that the CLR maintains less state. This approach requires less CLR assembly-loading overhead. If your application has multiple modules, merge them into a single module. Check to make sure that the reference is necessary. The command Tlist shows all the modules that are loaded by a process.įor example, if you are not connecting to the Web and you see that is loaded, then there is a module in your application that references this assembly. Use tools such as Process Explorer (Procexp.exe) and Tlist.exe to determine which modules your application loads. The following sections describe some of these situations in more detail. If your application's cold startup issue is not related to I/O, it is likely that your application performs some lengthy initialization or computation, waits for some event to complete, or requires a lot of JIT compilation at startup. If all subsequent launches of your application (warm startup) are much faster, your cold startup issue is most likely caused by I/O. Start your WPF application immediately after a reboot, and determine how long it takes to display. In general, you should minimize the use of external resources, such as network, Web services, or disk.īefore you test, verify that no other running applications or services use managed code or WPF code. Disk I/O may be responsible, but this is not always the case. Analyze the Startup Codeĭetermine the reason for a slow cold startup. Display your implementation before the Run method is called. You can also implement your own splash screen by using native Win32 graphics. For more information, see Add a Splash Screen to a WPF Application. NET Framework 3.5 SP1, you can use the SplashScreen class to implement a splash screen. When the application is ready to display its first UI, the splash screen fades. This approach displays an image almost immediately after the user starts the application. In cases where there is a significant, unavoidable delay between starting an application and displaying the first UI, optimize the perceived startup time by using a splash screen. That is why a managed application starts faster when it runs a second time. Warm startup occurs when most of the pages for the main common language runtime (CLR) components are already loaded in memory, which saves expensive disk access time. ![]() Disk access is required to bring the pages into memory. When an application starts, if the required pages (code, static data, registry, etc) are not present in the Windows memory manager's standby list, page faults occur. Understanding Cold Startup and Warm StartupĬold startup occurs when your application starts for the first time after a system reboot, or when you start your application, close it, and then start it again after a long period of time. ![]() This topic describes various techniques for reducing the perceived and actual startup time for a Windows Presentation Foundation (WPF) application. The amount of time that is required for a WPF application to start can vary greatly. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |