.NET: Windows Builds / Controls Performance

We have an application with a very heavy interface. Recently, our customers started complaining about application launch performance. (Previously, our controls / forms were initialized while some kind of splash screen was shown with the message "start").

I did some research and found that calling the InitializeComponent () method (which is generated by the VS constructor) can take up to ~ 0.4-0.5s for complex controls. And there are many such controls, so I get ~ 10-15 seconds of application startup time as a result. There is nothing that could be really heavy, it only controls initialization (for example, various toolbars, tool buttons, initializing menustrips, setting up different texts, etc.).

Is there a way to improve the performance of initializing controls in this case? Maybe some kind of caching or something like this (so that our application will only start slowly during the first boot)?

PS We are using .NET 2.0

Thanks in advance.

+3
source share
2 answers

You indicate that you have performed at least some rudimentary analysis of the startup time of your application, but you have completely profiled your application using the Visual Studio profiler, ANTS, or the like?

Thoroughly profiling your application will give you the most accurate breakdown of where your application is spending its time. Less and less, and you just guess.

You can also review the application parts of your application and re-profile the launch time of the application to determine if NGENning really improved your code.

, - , . VITAL , .

, , - , WinForms . , WPF , , , .

.

+1
  • pc

  • WPF (.net 3.5)

0

Source: https://habr.com/ru/post/1794362/