I am using a bog standard CompositionContainer to discover types in a dll not referenced by my project, like this :
var catalog = new DirectoryCatalog(di.FullName);
var container = new CompositionContainer(catalog);
var capabilities = container.GetExportedValues<MyType>();
This is one of the slowest things in my project, and according to my profiler, the vast majority of the time is spent doing AssemblyCatalog.GetExports, iterating through AttributedPartCreationInfo MoveNext.
Is there anything I can do to tune this, or make life easier for the container?