This project has moved. For the latest updates, please go here.

Performance Issue During Compose

Jul 6, 2009 at 7:22 PM

I am working on a rather large application and using MEF to import plug-ins that fit into our system.  The plug-in we are currently working on uses a third party API to connect and retrieve additional data.  The API has a good deal of overhead and when the UI component is imported the DLLs seems to get compiled during composition.  There is around a 20 to 30 second delay while the assemblies are being composed.  We are looking to increase the response time since this is a UI component but because of the context our application is running in, I'm not sure if there is a way to use reflection or anything like that without breaking code in another, unrelated, section of the plug-in.  The plug-in has two parts, a service that runs in our service engine.  The service also uses MEF to import code.  The second part is a UI component that is utilized through COM and MMC to interact directly with active directory.  I care about the performance on the UI side but not necessarily the service side.  The UI and the service are importing separate contracts for the imported assembly and the assembly being imported has multiple contracts.  I hope this was clear enough of a description of my problem.  I wrote it a few times because it started to sound confusing.  Any help would be appreciated and if you have any questions please ask. Thanks in advance.

Jul 13, 2009 at 6:39 PM


Generally the only way to accurately diagnose performance problems is via profiling. From what you've described it sounds unlikely that MEF is the root cause.

If you're able to post a performance profile we can have a look to see whether any hot spots are MEF-related.