microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.56k stars 29.01k forks source link

TypeScript autocomplete and linting features are unusably slow #224979

Open benhchoi opened 2 months ago

benhchoi commented 2 months ago

Type: Performance Issue

Started a couple of months ago after a VS Code update (potentially an issue with an extension, not Code itself). It occurs specifically for backend code written in NestJS with help from Nx. Frontend code written in Angular in the same repo does not have the same issues with autocomplete and linting being slow.

VS Code version: Code 1.92.0 (b1c0a14de1414fcdaa400695b4db1c0799bc3124, 2024-07-31T23:26:45.634Z) OS version: Darwin x64 23.5.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 x 2600)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off| |Load (avg)|10, 7, 7| |Memory (System)|16.00GB (0.34GB free)| |Process Argv|--crash-reporter-id 4379f514-5083-438d-b371-fdc28f8a80a2| |Screen Reader|no| |VM|0%|
Process Info ``` CPU % Mem MB PID Process 54 180 94415 code main 8 66 94418 gpu-process 0 16 94419 utility-network-service 22 524 94420 window [1] (policies.guard.spec.ts — newbee) 11 82 94730 shared-process 0 33 94909 ptyHost 0 0 94914 /bin/zsh -il ```
Workspace Info ``` | Window (policies.guard.spec.ts — newbee) | Folder (newbee): more than 20795 files | File types: json(5635) ts(3660) js(2992) map(2274) mjs(1432) | commit(305) txt(76) md(73) npmignore(31) woff2(20) | Conf files: package.json(101) project.json(6) devcontainer.json(1) | Launch Configs: chrome; ```
Extensions (52) Extension|Author (truncated)|Version ---|---|--- ng-template|Ang|18.1.2 vscode-tailwindcss|bra|0.12.5 npm-intellisense|chr|1.4.5 postcss|css|1.0.9 dart-code|Dar|3.94.0 flutter|Dar|3.94.0 vscode-markdownlint|Dav|0.55.0 vscode-eslint|dba|3.0.10 vscode-html-css|ecm|2.0.10 EditorConfig|Edi|0.16.4 prettier-vscode|esb|10.4.0 vscode-jest-runner|fir|0.4.73 shell-format|fox|7.2.5 remotehub|Git|0.62.0 vscode-pull-request-github|Git|0.94.0 vscode-env|Iro|0.1.0 vscode-language-babel|mgm|0.0.40 vscode-docker|ms-|1.29.1 vscode-kubernetes-tools|ms-|1.3.16 autopep8|ms-|2024.0.0 debugpy|ms-|2024.10.0 isort|ms-|2023.10.1 python|ms-|2024.12.2 vscode-pylance|ms-|2024.8.1 jupyter|ms-|2024.7.0 jupyter-keymap|ms-|1.1.2 jupyter-renderers|ms-|1.0.19 vscode-jupyter-cell-tags|ms-|0.1.9 vscode-jupyter-slideshow|ms-|0.1.6 remote-containers|ms-|0.380.0 remote-ssh|ms-|0.112.0 remote-ssh-edit|ms-|0.86.0 remote-wsl|ms-|0.88.2 vscode-remote-extensionpack|ms-|0.25.0 cmake-tools|ms-|1.18.44 cpptools|ms-|1.21.6 cpptools-extension-pack|ms-|1.3.0 live-server|ms-|0.4.14 makefile-tools|ms-|0.9.10 remote-explorer|ms-|0.4.3 remote-repositories|ms-|0.40.0 remote-server|ms-|1.5.2 angular-console|nrw|18.25.0 postman-for-vscode|Pos|1.2.1 vscode-xml|red|0.27.1 vscode-yaml|red|1.15.0 vscode-lezer|tam|0.14.0 pdf|tom|1.2.2 intellicode-api-usage-examples|Vis|0.2.8 vscodeintellicode|Vis|1.3.1 vscode-icons|vsc|12.8.0 vscode-todo-highlight|way|1.0.5 (1 theme extensions excluded)
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805cf:30301675 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 962ge761:30959799 pythongtdpath:30769146 welcomedialogc:30910334 pythonnoceb:30805159 asynctok:30898717 pythonregdiag2:30936856 pythonmypyd1:30879173 h48ei257:31000450 pythontbext0:30879054 accentitlementsc:30995553 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 dsvsc021:30996838 945dj816:31013170 pythoncenvpt:31062603 a69g1124:31058053 dvdeprecation:31068756 dwnewjupytercf:31046870 impr_priority:31102340 refactort:31108082 ccpltc:31103427 pythonrstrctxt:31103193 wkspc-onlycs-t:31106322 ```
mjbvz commented 2 months ago

Does this reproduce in the latest VS Code insiders build with all extensions disabled? Specifically try disabling the angular extensions

benhchoi commented 2 months ago

The problem persists on my regular VS Code installation with all extensions disabled. However, it seems to run without the performance dip in the latest VS Code insiders build with all extensions disabled.

HananINouman commented 1 month ago

it didnt run with me :/, i hope this gets a fix soon!

nabildroid commented 1 month ago

very slow, kills the productivity right away, and brings the procrastination

ardabeyazoglu commented 1 week ago

I have the same nestjs/nx setup, and it incredible slow lately. I thought maybe a single package is causing this, but it seems the problem is deeper. I have also frontend with nx but vuejs, no issue although it is huge. I suspect the problem is somewhat related to nestjs but can't be sure.