NGen and bad advice
on 02.13.04, 09:08am in .net • digg this • comments (0)
[Randy Rants] Thanks to FurryGoat and MSDN I found a little tweak that I could make to the install process of SharpKeys (as well as SharpMT) that can speed up the initial start of the application by a huge order of magnitude….
One of the tips that came from MSDN for enhancements was to pre-compile Windows Forms based applications… there were two ways to do this: one was pre-compile them here, before releasing the application, but they say that it won’t be as effective as the other way: pre-compile the application as part of the installation on the target machine.
Long and short of this is that Randy is talking about running ngen.exe on your application. While this initally may sound like a good idea (hey anything to get some extra speed), the general advice that I’ve read is not to ngen assemblies - unless you’re part of the System namespace and part of the CLR. Jeffrey Richter and Jason Zander have some additional insights on using ngen.



