3 ms·
That's a great observation about Chrome DevTools. The performance impact happens because DevTools adds significant overhead - it's instrumenting every network r
by gangtao 1y ago
That's a great observation about Chrome DevTools. The performance impact happens because DevTools adds significant overhead - it's instrumenting every network request, DOM change, and JavaScript execution for debugging purposes. The jump to 100% CPU is likely the profiler trying to capture all the WebSocket/SSE events in real-time.
It's one of those cases where the act of measuring changes the system being measured - similar to Heisenberg's uncertainty principle in quantum mechanics, where you can't simultaneously measure both the exact position and momentum of a particle because the observation itself affects the system. Here, we can't get truly accurate performance measurements while DevTools is actively monitoring, because the monitoring process fundamentally alters the runtime characteristics we're trying to observe. The more granular the measurement (like real-time WebSocket message logging), the more we disturb the original system behavior.