Download a Windows form with over 200 controls

My form has over 200 controls! It takes about 7 seconds to load the form and snap the controls.

I traced the application with some performance profilers, but I did not find anything with the HOT flag except for the form constructor.

I would like to know that you can call the InitializeComponent method with sth, for example backgroundWorker (multithreading) !?

-1
source share
6 answers

No, the thread will not help. Controls must be created in the user interface thread so that the application can work at all.

, 200 , , , " ".

, , , , , - . , "", , , .

+8

TabControl. .

Per MSDN:

, TabPage, , , , .

.

+6

- . , , , WinForms. 200+ Windows Forms , , .

, : , , - , .

+4

, :

  • [DebuggerStepThru] InitializeComponent, , ( "" IDE 20x , ).
  • WPF, .
  • InitializeComponent , . 20MS. . , initializcomomponent 200-case select statement. 201 . , , . controls.add, . . . , , foo, , - , .
+1

, NGen - . ( , , ) NGen-ed, , .

0

Judah, MDI WinForms, 200 , , . -, , , , -, SKU, , , , , .. -, -, , . , , .., .

7 . ; - , 200 , . , " " , , . (, -), , ; 10 , 100, , , , , , .

0
source

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


All Articles