Link to home
Start Free TrialLog in
Avatar of leonardjp
leonardjp

asked on

NGEN.exe, how to use it and can it be used in an MSI??

I have been reading how the ngen.exe may help the launch time of an application, but I was hoping someone could shed more light on how to use it.

Here is my scenerio.

My application has extremely slow launch time and I am assuming its because its compiling very large shared assemblies that are from MapInfo.  There are 6 assemblies in total that it uses and the start up time is in excess of two minutes.

Will NGEN.exe benefit me?
Do I only have to apply it the main executable?
If not can I apply it to Mapinfo assemblies?

And if I could do any of these, can it be used in a installation Package ?

Thanks for the help!
ASKER CERTIFIED SOLUTION
Avatar of RonaldBiemans
RonaldBiemans

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RonaldBiemans
RonaldBiemans

To change the base address of your dll, use the properties of your project, choose configuration properties, choose optimizations. try keeping the values far enough apart so that dll don't overlap in memory
But keep in mind that it will load faster, but it will probably run slower.
Avatar of leonardjp

ASKER

Could you explain, in a little more detail, how to add ngen to the installation package?
Also, I am creating the MSI using MapInfo Merge Modules, will NGEN be any help to me?
To add ngen to your installation package just add it in the file system of your installation package, and run it in a custom action in the commit phase. I'm afraid I have no experience with mapinfo merge modules so I'm no help there :-)
Thanks for the help.  I have changed the base address of my dlls and that has appeared to work a little.   I'll attempt the NGEN and compare the performance.  thanks again.