loading speed ...

  • Thread starter Thread starter Lloyd Dupont
  • Start date Start date
L

Lloyd Dupont

I wondered if there is a way to speed up the application load ?

like putting the app in the GAC or precompiling.
any tip ? and how to do that ?
 
I read that but these optimisation suggest you should rewrite the
InitializeComponent() method, therefore rending the designer unusable
further.
which definitely doesn't fit me ;-(

Furthermore I do lazy loading of all my forms and the first ones (loaded at
start) are so simple they couldn't count for the slow startup.

I was suspecting JIT compilation and validation as all my .exe & .dll
together sum up to 1.24MB and wondered if it could be that ?

on another thought it might as well be the fact I'm loading 35 icon at the
start each as an embeded resource, is there a way to improve that ?
I load them to initialize my app wide image list ...
 
The entire application is not JITted when it is first loaded. But anything
in InitializeComponent as well as methods that this method calls will need
to be compiled. The more of this type of work that is done at app startup
the slower the application will load. In general try to do as little loading
and work as possible when the application is first starting. Obviously you
need some work to be done when the app initializes but anything that is not
absolutely necessary, and can be loaded on demand later in the application,
you might consider moving out of app startup territory. Installing SP2
should help a bit as well, if you haven't already (specifically SP2 has
improved resource loading performance). But going over your code from the
start and deciding what can be loaded at a later point and what must be
loaded at startup is probably one of the best things that you can do (aka
planning).
 
Back
Top