Skip to content

Conversation

@connor4312
Copy link
Member

@connor4312 connor4312 commented Jan 14, 2020

tl;dr of the investigation from #120 was that the big culprit of slower
commands in the terminal were async stack traces. In this PR, we
introduce logic, enabled by default in the terminal, which does not turn
on async stack tracking until a breakpoint is hit or the debugger
pauses, whichever happens first.

This allows standard build commands like Webpack to run much faster if
the developer is using the debugger terminal like any other terminal and
isn't interested in debugging the current task.

On my machine it reduces debug overhead from 120% to 30%:

PS > Measure-Command { webpack }

              Normal Terminal: 12.46 / 12.16 / 13.07
   Debugger Terminal (master): 22.58 / 23.33 / 22.82 (2.2x)
  Debugger Terminal (this PR): 16.90 / 16.86 / 16.71 (1.3x)

Fixes #120

@connor4312 connor4312 requested a review from roblourens January 14, 2020 23:41
tl;dr of the investigation from #120 was that the big culprit of slower
commands in the terminal were async stack traces. In this PR, we
introduce logic, enabled by default in the terminal, which does not turn
on async stack tracking until a breakpoint is hit or the debugger
pauses, whichever happens first.

This allows standard build commands like Webpack to run much faster if
the developer is using the debugger terminal like any other terminal and
isn't interested in debugging the current task.

On my machine it reduces debug overhead from 120% to 30%:

```
PS > Measure-Command { webpack }

            Normal Terminal: 12.46 / 12.16 / 13.07
	     Debugger Terminal (master): 22.58 / 23.33 / 22.82 (2.2x)
	     Debugger Terminal (this PR): 16.90 / 16.86 / 16.71 (1.3x)
```
@connor4312 connor4312 force-pushed the feat/lazy-async-stacks branch from 17ad7e4 to 30875cc Compare January 14, 2020 23:49
@connor4312 connor4312 merged commit 53a36eb into master Jan 15, 2020
@connor4312 connor4312 deleted the feat/lazy-async-stacks branch January 15, 2020 05:52
@connor4312 connor4312 added this to the January 2020 milestone Jan 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Running tasks in the debug terminal can be significantly slower

3 participants