How to speed optimize WinForm applications. I am not talking about apparent .NET opt. technics - like ngen-ing, caching objects, etc. Already tried that and what I am up to is to reduce the form initilization time from a 1500 msec down to 500msec.
Profiling has identified the slowest code and almost all of it is in the InitializeComponent, and within this method the slowest lines is
- creation of the (just new-ing) WebBrowser component
- loading icon from a resource (hideous 500msec)
- creation of the ContextStripMenu
- several this.Controls.Add() calls contribute a lot too.
At the moment can only see how to fix point (2) - move icon data from being stored as embedded resource to a private field (e.g. base64-encoded string)
but I have no idea what to do with points 1, 3 and 4.
Your ideas would be greatly appreciated!
Thank you.