title: Assembly.Load performance impact
body: <p>I'm working on a component which executes provisional method of any interface registered with ioc, and execution moment depends on different triggers. It must be able to save actions to be performed to database, so I'm saving method name, type and list of parameters (serialized to BLOB) into database until needed.</p>
  
  <p>When trigger occurs, I need to execute method on a instance of type. As I'm using dependency injection, I have interface name saved into database (in format <code>"Namespace.IInterface, AssemblyName"</code>)</p>
  
  <p>To run <code>Resolve&lt;IInterface&gt;()</code> method on ioc container, I need instance of its <code>Type</code>:</p>
  
  <pre><code>Assembly assembly = System.Reflection.Assembly.Load(assemblyName);
  Type service = assembly.GetType(typeName);
  object instance = IOCContainer.Resolve(service);
  </code></pre>
  
  <p>My questions are:</p>
  
  <ul>
  <li>Is there a better way to get an instance of Type from its name, if
  I'm sure that containing assembly is already loaded into app domain? <em>(I tried with simply <code>Type.Load(typeName)</code> but got null)</em></li>
  <li>If assembly in question is already loaded, will CLR optimize that process (use already loaded), or I need to manually cache list of assemblies to prevent performance impact of repeatedly loading same assembly over and over?</li>
  </ul>