While working with a .NET application which references a large number of libraries (some third party, some not), several questions came up regarding performance and the use of libraries in .NET applications.
Considerations
When referencing a large number of libraries, what considerations come into play? For instance, I would imagine that there may be performance/memory hits during start-up.
Profiling
I know how to get the list of loaded modules using tasklist /M
from the command line, but are the ways to measure the memory footprint of the application's referenced libraries (I realize that it's likely that many are shared), or the time it takes to load all of them?
Optimization
Are there ways to defer loading libraries until they are needed? Looking at the loaded modules for my application, I'm seeing modules which likely are not needed by the average user, but are loaded just in case. This question of course assumes that there is some non-negligible cost associated with loading modules.