----------------------------------------------------------- New Message on BDOTNET
----------------------------------------------------------- From: KGK Message 8 in Discussion Wow!! There's so much being said about the NGEN/MSCORPE.DLL relationship that I feel this need to give my views too... Typically, you would never want to use PreJITting. Why? Because the on the fly compilation is: 1) Lightweight: since the CLR and its loaders shall load only those types that are required at any gievn point of time. So, if Main method is being loaded and it uses objects of Class X, then only Class X will be loaded, even if Main makes a call to FuncX, which uses Class Y and Class Z. FuncX will not be loaded and compiled. Until funcX is called, it wont be loaded or compiled. So, no need to compile what is (and may never be) needed. Kind of similar to delay-loading that VC++ 6 introduced. 2) Less Bulky: Doing PreJIt implies that the entire code will be converted to the native image. Implies FuncX will be compiled too and when you attempt to load the native image, FuncX will also be loaded when it neednt be, since it might not even be called. Also, PreJIT requires that all dependent assemblies be in place when the PreJITting is happening. Failure will result in failed compilation. 3) Prone to virtual memory fragmentation resulting in lesser performance than a managed code being compiled on the fly. Finally, even if you PreJIT your assembly and later recompile the original, the PreJITted one will not be loaded. Module Version IDs will indicate to the CLR that the image is out of date and hence the CIL will be loaded and the standard on-the-fly- JITting will work. Hope this clears why (or why not) should PreJIT be used... Cheers :) Gaurav ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/bdotnet/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]
