I can't share the entire codebase to reproduce the issue, but I'm using Visual Studio Diagnostic Tools to inspect performance and operations are taking many times longer to execute that what's getting reported in CPU usage.
Example Code
Here's an example of the offending block of code between two breakpoints:
Profiling Time
The CPU samples inside this method only suggest it's spending about 1000 ms to execute:
Execution Time
However, it takes nearly 50 seconds between breakpoints
Question
- What could cause such a long execution timeline that doesn't show up when profiling?
Things I've Tried:
-
Restarting VS
-
Restarting Machine
-
Reloading Symbols
-
Caching Symbols