----------------------------------------------------------- New Message on BDOTNET
----------------------------------------------------------- From: SecCode Message 1 in Discussion Came across this recently from a member of the Microsoft CLR team, thought you all would find this interesting... ============== From: Brad Abrams [MSFT] Subject: Perf trade off: lots of small assemblies or fewer bigger assemblies?? As Rico would say, nothing is 100%, you have to measure, but the census of the CLR perf folks is that fewer bigger assemblies are better. Lot of assemblies in the managed world is bad for the same reason lot of dlls are bad in the unmanaged world. The OS has a per-dll cost which is reduced by combining assemblies. In addition, inlining can be more aggressive within an assembly The biggest reason that assemblies are expensive is because we try very hard to make everything else 'light'. Thus we try to push everything that can be shared to the assembly level that we can (thus it is shared among all classes in the assembly). Similarly, we try to optimize class loading at the expense of assembly loading, since we expect more class loads. If you have lots of small assemblies, you ruin this heuristic. Assemblies are also the unit of enforcing security. Thus when doing cross assembly calls inlining is more constrained. You are also fighting the OS heuristics. The File system is very good at prefetching data that is contiguous, however if you have lots of DLLs, they are not likely contiguous, which means disk moves, and significant loss of startup time. Also, because of compatibility issues, changing assembly boundaries is painful. Thus it is worth some time 'up front' to insure that you can live with your present setup for a very long time. ============== BTW, Improving .NET Application Performance and Scalability from the Microsoft PAG is now available as a PDF download. You can get it @ http://www.microsoft.com/downloads/details.aspx?familyid=8a2e454d-f30e-4e72- b531-75384a0f1c47 - Anil ------------------------------------------------------------------- - http://SecureCoder.com - Architecture & Security in an Imperfect World ------------------------------------------------------------------- ----------------------------------------------------------- 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]