I have a program that\'s running pretty slowly (takes like 20 seconds even on release) so, wanting to fix it, I tried to use Visual Studio\'s built in profiler. However, whe
That sounds a lot like a Heisenbug.
They really happen, and they can be painful to uncover.
Your best solution in my experience is to change how you are profiling -- possibly several ways -- until the bug disappears.
Use different profilers. Try adding timing code instead of using a profiler.