Skip to content

Intellisense refactoring extremely slow when using pnpm #42870

Closed
@wdamien

Description

@wdamien

Issue Type: Bug

I switched my react/typescript project to use pnpm to improve my CI build times, this lead to a massive slow down with the intellisense import suggestions. On the order of 3 - 5 seconds just to populate the context menu. If I used the "Add all missing imports" feature that could take a few minutes to complete (for a lot of missing imports this was literally ~10 minutes before it timed out out on me). I tested with all my extensions disabled, and still had the same performance issue. Cleaning my node_modules, and using npm or yarn to install the modules fixed it.

Repo:

  • In a medium or large sized typescript project; Clean out your node modules rm -rf node_modules/
  • Use pnpm to install everything. pnpm i
  • Open a file and add some missing references, and try to use intellisense to import the missing references, notice the slow import times.
  • Try the "Add all missing imports" options and notce the time it takes to load. This repos best with a long of missing imports like 10 or so. After ~10 minutes VS code displayed this error in an alert: Running the contributed command: '_vscode_delegate_cmd_klb4cauz' failed.

VS Code version: Code 1.53.2 (622cb03f7e070a9670c94bae1a45d78d7181fbd4, 2021-02-11T11:45:54.515Z)
OS version: Darwin x64 19.6.0

System Info
Item Value
CPUs Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 x 2600)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 4, 3, 3
Memory (System) 16.00GB (0.98GB free)
Process Argv -psn_0_114716 --crash-reporter-id 8e076c0e-bbd2-411c-aaf9-118c864294b9
Screen Reader no
VM 13%
Extensions (41)
Extension Author (truncated) Version
xd ado 1.1.2
azurite Azu 3.11.0
spellright ban 3.0.56
emojisense bie 0.8.0
markdown-checkbox bie 0.1.3
vscode-intelephense-client bme 1.6.3
path-intellisense chr 2.3.0
codeswing cod 0.0.11
dart-code Dar 3.19.2
flutter Dar 3.19.0
vscode-eslint dba 2.1.14
xml Dot 2.5.1
gitlens eam 11.2.1
tsl-problem-matcher eam 0.3.1
EditorConfig Edi 0.16.4
prettier-vscode esb 5.9.2
vscode-jest-runner fir 0.4.31
auto-close-tag for 0.5.10
react-native-snippet jun 0.5.6
vscode-gutter-preview kis 0.26.2
vscode-language-babel mgm 0.0.30
import-sorter mik 3.3.1
dotenv mik 1.0.1
vscode-apache mrm 1.2.0
vscode-scss mrm 0.9.0
vscode-azurefunctions ms- 1.2.1
vscode-azurestorage ms- 0.11.0
remote-wsl ms- 0.53.4
azure-account ms- 0.9.6
node-debug2 ms- 1.42.5
powershell ms- 2020.6.0
vscode-typescript-tslint-plugin ms- 1.3.3
debugger-for-chrome msj 4.12.12
vscode-react-native msj 1.4.0
vscode-jest Ort 3.2.0
vscode-css-navigation puc 1.10.3
code-settings-sync Sha 3.4.3
vscode-scss-formatter sib 2.1.0
gistfs vsl 0.2.2
markdown-all-in-one yzh 3.4.0
html-css-class-completion Zig 1.20.0

Metadata

Metadata

Assignees

Labels

DuplicateAn existing issue was already created

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions