Assembly Performance & Scalability
I was going through Eric’s blog related to Assembly performance considerations. Here is his summary.
Factor functionality into assemblies based on:
- Performance - There is overhead in loading each assembly. All other things being equal, the fewer assemblies an application loads, the quicker the load time.
- Versioning - All code in an assembly must version at the same rate
- Security - All code in an assembly has the same identity and is granted the same level of trust.Performance
- Prefer single, large assemblies to multiple, smaller assemblies
- Helps reduce working set of application
- Large assemblies are easier for NGEN to optimize (better image layout, etc)
- If you have several assemblies that are always loaded together, combine into a single assembly
Now my turn. If you are designing an enterprise level application with multiple developers I would suggest horizontal layers, rather than a single assembly. If your team size is too big, you can even divide the horizontal layer into vertical slices according to funcitonality. But this is just to save development/manintance time (thinging about scalability too), while deploying we can merge the same into one assembly. So design decision has to be a compromise between the performance & scalability.













