title: Visual studio 2013 Slow in editing razor files
body: <p>I just had installed VS2013. When I press <kbd>Up</kbd> or <kbd>Down</kbd> keys in a razor file editor which it is not pure html and has some razor codes VS 2013 slow down and permanently consume ~25% of CPU and everything is slow until I restart the VS.</p>
  
  <p>I noticed that the problem only occurs when the razor document is reopened. If the document is already open when you open the Solution the problem doesn't occur.</p>
  
  <p>I try many things but none of them fix the problem:</p>
  
  <ul>
  <li>Disabling <strong>Resharper</strong></li>
  <li>Disabling <strong>Productivity Power Tools 2013</strong></li>
  <li>Deselecting "<strong>Rich client visual experience</strong>" in the "<strong>Options - Environment</strong>"</li>
  <li>Disabling git plug-in or other Source Control: set <strong>Current source control</strong> plug-in to <strong>None</strong></li>
  </ul>
  
  <p>I test it in same machine in VS 2012 and everything was working normal.
  <hr>
  <strong>Edit:</strong> I had tested different scenarios and finally I found out that the following lines cause the problem:</p>
  
  <pre class="lang-razor prettyprint-override"><code>&lt;ul&gt;
      &lt;li style="@(!User.IsInRole("men") ? "display: none" : "")"&gt;Menu1&lt;/li&gt;
      &lt;li style="@(!User.IsInRole("women") ? "display: none" : "")"&gt;Menu2&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>If I remove the <code>style="@(!User.IsInRole("men") ? "display: none" : "")"</code> the problem not occurs anymore. Any idea?
  <hr>
  <strong>Edit:</strong> I had reported the problem to microsoft <a href="https://connect.microsoft.com/VisualStudio/feedback/details/861957/visual-studio-2013-slow-down-in-editing-razor-files-until-restart" rel="noreferrer">here</a> please upvote for better &amp; quick support.</p>