7

VSCode on my Macbook Pro is practically unusable due to the intellisense being ungodly slow. This includes:

  • hovering to find typescript types, inferred and explicit types
  • autocomplete variables/functions/etc
  • autocomplete for using shortcuts
  • error lines shown in editor

For example, I will have an error show. Something like "variable not defined" or something simple. But then when I go to rewrite the code, it takes forever for VSCode to catch up. Sometimes I have to let it sit 40-50seconds before it catches up with my changes. Hovering over typescript types is practically impossible at times and utterly useless. Below is a screenshot of the "lag" - changes were made, but it stuck like this for 30+ seconds:

enter image description here

  • It may be the specific project, because I can't recreate it for smaller projects. However, its only a 200k line project.
  • No specific extensions are slowing down VScode
  • I tried downgrading VsCode with no help

VSCODE VERSION: 1.47.3

Gama11
  • 31,714
  • 9
  • 78
  • 100
user10741122
  • 781
  • 1
  • 12
  • 26
  • As a remedy, you may want to try installing `ms-vscode.vscode-typescript-next` for [Partial Editing Mode](https://devblogs.microsoft.com/typescript/announcing-typescript-4-0-beta/#partial-editing-mode-at-startup) - Although this also upgrades vscodes typescript to 4.0 – Elias Schablowski Aug 11 '20 at 18:11
  • already installed @EliasSchablowski – user10741122 Aug 11 '20 at 18:49
  • The only other thing to try would be to remove the typescript cache, or checking on a different computer (maybe the FS isn't fast enough) – Elias Schablowski Aug 11 '20 at 21:19
  • @EliasSchablowski so if its slow on another machine its the project? could that mean too many types? wrong configuration in eslint? – user10741122 Aug 12 '20 at 14:04
  • It could be a lot of different things, among them are that it could just be too large/complex to be performant - Although you may try disabling the eslint plugin to check for invalid configs on that side (I've personally had this issue before - not invalid just eslint sometimes slows vscode down) – Elias Schablowski Aug 13 '20 at 01:50

1 Answers1

2

In my case, the issue was GitLens. I was able to isolate this issue by using the Command Palette (Control + Shift + P) to disable all extensions (this will not uninstall them), restarted Visual Studio, then checked if the issue persists.

The issue did indeed persist, so I went into the Extensions tab extensions tab and filtered by @disabled:

disabled filter

By reenabling my extensions one by one, I found GitLens to be the culprit.

Ali Bdeir
  • 4,151
  • 10
  • 57
  • 117
  • I experienced this too - it appeared to me that the GitLens extension was committing my changes on every keystroke, probably so it could have unlimited undo. – James McPherson Jul 19 '22 at 20:21