How to speed up the optimization of Windows Forms applications?
I'm not talking about explicit .NET optimization methods - for example, NGEN -ing, object caching, etc. I have already tried this and that I want to reduce the form initialization time from 1500 ms to 500 ms.
Profiling determined the slowest code, and almost all of it in the InitializeComponent
, and in this method the slowest lines
- creating a (only new) WebBrowser component
- resource loading icon (disgusting 500 ms)
- creating
ContextStripMenu
- several calls to
this.Controls.Add()
also contribute.
At the moment, I can only see how to fix point (2) - move the icon data from the storage as a built-in resource to a personal field (for example, Base64 encoded string).
What to do with points 1, 3 and 4?
Optimizer
source share