title: Visual Studio C++ Disable debugging in specific parts of code
body: <p>I have a operation in my project which takes around <strong>2 minutes</strong> in debugging mode and less than <strong>a second</strong> in release mode. (If it matters, it's a function that writes a lot to a vector).</p>
  
  <p>Obviously it's nearly impossible to use my application while in debugging mode due to the terrible performance that piece of code is causing.</p>
  
  <p>So my question is: Is it possible to enable performance optimizations and disable debugging for a specific file or class? If not, any other ways to solve this problem?</p>