title: How to "warm-up" Entity Framework? When does it get "cold"?
body: <p>No, the answer to my second question is not the winter.</p>
  
  <p><strong>Preface:</strong></p>
  
  <p>I've been doing a lot of research on Entity Framework recently and something that keeps bothering me is its performance when the queries are not warmed-up, so called cold queries. </p>
  
  <p>I went through the <a href="http://msdn.microsoft.com/en-us/data/hh949853.aspx" rel="noreferrer">performance considerations</a> article for Entity Framework 5.0. The authors introduced the concept of <strong>Warm</strong> and <strong>Cold</strong> queries and how they differ, which I also noticed myself without knowing of their existence. Here it's probably worth to mention I only have six months of experience behind my back.</p>
  
  <p>Now I know what topics I can research into additionally if I want to understand the framework better in terms of performance. Unfortunately most of the information on the Internet is outdated or bloated with subjectivity, hence my inability to find any additional information on the <em>Warm</em> vs <em>Cold</em> queries topic.</p>
  
  <p>Basically what I've noticed so far is that whenever I have to recompile or the recycling hits, my initial queries are getting very slow. Any subsequent data read is fast (<em>subjective</em>), as expected.</p>
  
  <p>We'll be migrating to Windows Server 2012, IIS8 and SQL Server 2012 and as a Junior I actually won myself the opportunity to test them before the rest. I'm very happy they introduced a warming-up module that will get my application ready for that first request. However, I'm not sure how to proceed with warming up my Entity Framework.</p>
  
  <p>What I already know is worth doing:</p>
  
  <ul>
  <li>Generate my Views in advance as suggested.</li>
  <li>Eventually move my models into a separate assembly.</li>
  </ul>
  
  <p>What I consider doing, by going with common sense, <strong>probably wrong approach</strong>:</p>
  
  <ul>
  <li>Doing dummy data reads at Application Start in order to warm things
  up, generate and validate the models.</li>
  </ul>
  
  <p><strong>Questions:</strong> </p>
  
  <ul>
  <li>What would be the best approach to have high availability on my Entity Framework at anytime?</li>
  <li>In what cases does the Entity Framework gets "cold" again? (Recompilation, Recycling, IIS Restart etc.)</li>
  </ul>