I have a operation in my project which takes around 2 minutes in debugging mode and less than a second in release mode. (If it matters, it's a function that writes a lot to a vector).
Obviously it's nearly impossible to use my application while in debugging mode due to the terrible performance that piece of code is causing.
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?