Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow stepping through large file #86850

Closed
roblourens opened this issue Dec 12, 2019 · 9 comments
Closed

Slow stepping through large file #86850

roblourens opened this issue Dec 12, 2019 · 9 comments
Assignees
Labels
upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@roblourens
Copy link
Member

@weswigham pointed this out.

Every time I step while debugging in vscode, the debug adapter gets a breakpointLocations request. We should only make this request when we need to, because it could be expensive. While debugging tests in the TS codebase, there is a case where sometimes the DA's request to the runtime takes a few seconds to complete when it is triggered at the same time as a step. The result is that each step takes about 3s, which is not a good experience. The file we are debugging is 11MB which probably accounts for part of the slowness.

@roblourens
Copy link
Member Author

@weswigham here is a version of the DA that has breakpointLocations disabled, if you want to verify that this fixes it

node-debug2-1.41.3.vsix.zip

@weswigham
Copy link
Member

weswigham commented Dec 12, 2019

Errr, it actually doesn't:

Check out line 1529:
debugadapter.txt

there's still a 3s delay between resume and the pause on the next line (and the line in question in this log is just an array.push, which shouldn't be a 3s operation). It's possible something in v8 itself is slow, but I have no idea how I'd verify that.

@weswigham
Copy link
Member

Yeah - definitely a v8 thing - if I revert to node 8 (vs 13), perf is fine. Lemme see if I can approximately track when it regressed.

@weswigham
Copy link
Member

weswigham commented Dec 12, 2019

Done. It's a regression in node 13.2.0 (there's no slowdown in 13.1, 13.2 and 13.3 are both slow). I haven't checked what v8 versions/changes that corresponds to, yet.

@roblourens roblourens changed the title vscode requests breakpointLocations on every step Slow stepping through large file Dec 12, 2019
@roblourens roblourens assigned roblourens and unassigned isidorn Dec 12, 2019
@roblourens
Copy link
Member Author

I filed nodejs/node#30926, also FYI @connor4312

@connor4312
Copy link
Member

May be related to microsoft/vscode-js-debug#138 as well (I tested on 12 and marked as CNR, could have been caused by testing on >13.2)

@roblourens
Copy link
Member Author

I don't think so. There aren't many variables being sent around.

@weswigham
Copy link
Member

Looks like this will be fixed by a new version of v8 (version 8.0 or above) in node 14+. I've checked with a canary build, specifically https://nodejs.org/download/v8-canary/v14.0.0-v8-canary2020011995087de57b/

@connor4312
Copy link
Member

Great to hear!

@connor4312 connor4312 added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Feb 4, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Nov 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

4 participants