0

I'm using VSCode with Remote Explorer to access a git repo on a server. In the past few weeks, it's started hanging for 3-5 seconds something like once a minute, which is super annoying. I did a performance record using Toggle Developer Tools, and I caught a function call that's hanging for 5000+ms. Unfortunately, I'm stumped looking at the code it points me too, as it's pretty dense js, which I'm not super familiar with.

Help: About

Version: 1.79.2 (user setup)
Commit: 695af097c7bd098fbf017ce3ac85e09bbc5dda06
Date: 2023-06-14T08:57:04.379Z
Electron: 22.5.7
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Windows_NT x64 10.0.19044

Performance graph

Function hanging for 5s

Garbage collection seems like a part of it, but not the whole delay

The function call is i.onload @ workbench.desktop.main.js:656:2301. From as much as I can tell, that just covers

this.i.onload=n=>{this.k=!1;const f=n.target.result;this.traceSocketEvent("read",f),this.a.fire(f),this.j.length>0&&s(this.j.shift())};

However, I can't figure out what this is referencing, and what the problem might be. Does anyone have any idea what is going on here? Is there a better location I should be asking about this?

LCB
  • 1
  • 2
  • 1) Please copy and paste the output of the `Help: About` command (run in [the command palette](//code.visualstudio.com/docs/getstarted/userinterface#_command-palette)) into your question post. 2) Does this happen when you run VS Code with extensions disabled `code --disable-extensions`? 3) try running VS Code like `code --verbose` or `code --verbose --log debug` or `code --verbose --log trace` and see if you see anything suspicious-looking? – starball Jul 05 '23 at 18:59
  • 1.) Edited 2/3.) I'll try this, but all the files and extensions are remote and seen through the remote explorer, so I'd imagine that it won't hang with extensions disabled. I'll edit if it somehow still happens – LCB Jul 05 '23 at 19:02
  • note (not sure if useful here): you can also disable specific extensions with `--disable-extension ` – starball Jul 05 '23 at 19:08
  • Do you have multiple folders, eg. where you right click add folder to workspace. I've noticed if you have, and there is an overlap & symlinks, I've noticed VS-Code will hit 100% and process `rg`, that I believe is the find process is the culprit. I've found if I make sure folders don't overlap it seems to be OK. – Keith Jul 05 '23 at 19:38
  • if this is ripgrep related, see also https://stackoverflow.com/q/75311062/11107541 and https://stackoverflow.com/q/65120743/11107541 – starball Jul 05 '23 at 19:42
  • @Keith -- I have one larger repo open with overlap and symlinks, which showed up somewhere around when I started noticing this issue. Could you explain what you mean by file overlap so I can see what I need to clear up and push? – LCB Jul 05 '23 at 20:35
  • @LCB To be fair, I'm not 100% sure what causes the issue, but it doesn't seem to happen as much if I don't have too many folders added to the workspace. The only other thing I use is `pnpm` and it's mono-repo feature, so maybe `rg` gets confused when a large `mono-repo` and extras folders are added to the workspace. – Keith Jul 05 '23 at 21:26
  • have you modified your user or workspace-level `files.exclude` or `search.exclude` settings in any way? If so, how? – starball Jul 05 '23 at 21:28
  • @starball I'm not sure if this is a question for Keith or myself, but I haven't made any modifications that I can remember. I'll try to explore `code --verbose` in some form to see if the "function call" is clarified in any way there. A recent hang brought up a 14-level recursive "layout shift" in addition to the same function call, as well. – LCB Jul 05 '23 at 21:44
  • the question was directed to you. And I encourage you to not hyperfocus on that function call when reading the output of `code --verbose --log `. There could be other useful info not related to it. – starball Jul 05 '23 at 21:46
  • Had the `rg` process go bonkers taking 100% today, but I think I've found the solution for that, just make sure you have `**/node_modules` in the `files/Exclude` for some reason I thought VS excluded this automatically, doing this seems to fix the issue.. I'm sure that pattern used to be in older versions of VS as default, and I wonder if they removed as they now follow `.gitignore`, but I don't use Git, so then had the issue. – Keith Jul 06 '23 at 10:00
  • actually I guess my question was directed at both LCB and keith. pnpm uses symlinks extensively. – starball Jul 06 '23 at 10:10
  • @starball Yes, that's why I use it. Great for mono-repo's, and super fast. – Keith Jul 06 '23 at 12:01

0 Answers0