title: How to solve Assembly.Load performance hit?
body: <p>I'm refactoring some code and I've been hit with a dilemma.</p>
  
  <p>Let's say we have the following scenario:</p>
  
  <ol>
  <li>A Core Assembly that contains many common interfaces and classes</li>
  <li>A Library Assembly that contains more specialized classes.</li>
  </ol>
  
  <p>The Library Assembly references the Core Assembly. So far so good.</p>
  
  <p>Due the fact that I'm refactoring this, there's a need for the Core Assembly to create objects that are declared in the Library Assembly.</p>
  
  <p>OK, in order to avoid a circular reference problem, I decided to load the Library Assembly when needed (and it's needed only in  a very specific point at the type initialization).</p>
  
  <p>However, the loading performance of the whole thing plummeted to a dark abyss...</p>
  
  <p>Does anyone know how to solve this?</p>
  
  <hr>
  
  <p><strong>Edited to add</strong></p>
  
  <p>Some people have requested the code I use to load... It's quite trivial, really.</p>
  
  <pre><code>/*
   * Load the Library Assembly
   */
  Assembly asm = Assembly.Load("Library, PublicKeyToken=...");
  
  /*
   * Get desired type
   */
  Type   t = asm.GetType("Library.DesiredType")
  
  /*
   * Get the default constructor
   */
  var ctor = type.GetConstructor(new Type[] {})
  </code></pre>