Skip to content

Slow Intellisense with node_modules after v1.74 #54360

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

Closed
kvart714 opened this issue May 23, 2023 · 3 comments
Closed

Slow Intellisense with node_modules after v1.74 #54360

kvart714 opened this issue May 23, 2023 · 3 comments
Assignees
Labels
Duplicate An existing issue was already created

Comments

@kvart714
Copy link

kvart714 commented May 23, 2023

Type: Performance Issue

Some performance issue with TypeScript Intellisense.
The problem remains without any extensions
I recorded a small demo video: https://drive.google.com/file/d/1zfMnJEDu131k0K65dO_Yb-Qiz935DVrs/view?usp=sharing
please tell me if I can gather any more information

In the video, I am using VS Code 1.73 (left) and VS Code Insiders (right) to run 2 versions at the same time, but the issue occurs on all versions of VS Code >= 1.74

The problem is clearly visible when using Ctrl + Mouse over:

  • VS Code 1.73 instantly highlights any token as a link on mouse hover
  • VS Code 1.74 takes a few seconds before displaying text as a link

with Ctrl+click:

  • VS Code 1.73 instantly go to definition
  • VS Code 1.74 needs a few seconds

you can also see that after deleting the node_modules folder, the problem disappears: VS Code starts working very quickly

Project: empty Angular project created by the ng new command. I also added the storybook with npx storybook@latest init to increase the size of node_modules (this makes the problem worse)

VS Code version: Code 1.74.3 (97dec172d3256f8ca4bfb2143f3f76b503ca0534, 2023-01-09T16:59:02.252Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Sandboxed: No

System Info
Item Value
CPUs Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz (16 x 2304)
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_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) undefined
Memory (System) 15.88GB (5.17GB free)
Process Argv --enable-proposed-api TabNine.tabnine-vscode --crash-reporter-id e0ce41fe-7355-4918-b32f-eb6b04e8b527
Screen Reader no
VM 0%
Process Info
CPU %	Mem MB	   PID	Process
    0	   101	 21172	code main
    0	    96	   556	   gpu-process
    0	    27	  5800	   crashpad-handler
    0	   114	 13328	   shared-process
    0	    77	 32028	     fileWatcher
    0	    75	 33860	     ptyHost
    0	    96	 13480	   window (undefined)
    0	    42	 16800	   utility-network-service
    0	    94	 20860	   issue-reporter
    0	   202	 27676	   window (test.component.ts - test - Visual Studio Code)
    0	   112	 34400	   extensionHost
    0	   117	 30396	     "C:\Users\isubbotin\AppData\Local\Programs\Microsoft VS Code\Code.exe" --ms-enable-electron-run-as-node --max-old-space-size=3072 "c:\Users\isubbotin\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js" --serverMode partialSemantic --useInferredProjectPerProjectRoot --disableAutomaticTypingAcquisition --cancellationPipeName C:\Users\ISUBBO~1\AppData\Local\Temp\vscode-typescript\d46a16b61a2e13f2b40c\tscancellation-554d296162d2fc75dcc6.tmp* --locale en --noGetErrOnBackgroundUpdate --validateDefaultNpmLocation --useNodeIpc
    0	   124	 30504	     "C:\Users\isubbotin\AppData\Local\Programs\Microsoft VS Code\Code.exe" --ms-enable-electron-run-as-node --max-old-space-size=3072 "c:\Users\isubbotin\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js" --useInferredProjectPerProjectRoot --enableTelemetry --cancellationPipeName C:\Users\ISUBBO~1\AppData\Local\Temp\vscode-typescript\d46a16b61a2e13f2b40c\tscancellation-ddb21837f055d0683c09.tmp* --locale en --noGetErrOnBackgroundUpdate --validateDefaultNpmLocation --useNodeIpc
    0	    94	 24088	       "C:\Users\isubbotin\AppData\Local\Programs\Microsoft VS Code\Code.exe" --ms-enable-electron-run-as-node "c:/Users/isubbotin/AppData/Local/Programs/Microsoft VS Code/resources/app/extensions/node_modules/typescript/lib/typingsInstaller.js" --globalTypingsCacheLocation C:/Users/isubbotin/AppData/Local/Microsoft/TypeScript/4.9 --enableTelemetry --typesMapLocation "c:/Users/isubbotin/AppData/Local/Programs/Microsoft VS Code/resources/app/extensions/node_modules/typescript/lib/typesMap.json" --validateDefaultNpmLocation
Workspace Info
|  Window (test.component.ts - test - Visual Studio Code)
|    Folder (test): 314 files
|      File types: json(246) ts(16) svg(8) pack(4) html(4) css(4) js(3)
|                  sass(3) ico(2) old(1)
|      Conf files: tsconfig.json(2) launch.json(1) tasks.json(1)
|                  package.json(1)
|      Launch Configs: chrome(2);
Extensions: none
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
vsclangdf:30486550
c4g48928:30535728
dsvsc012:30540252
pynewext54:30695312
azure-dev_surveyone:30548225
282f8724:30602487
pyind779:30671433
f6dab269:30613381
pythonsymbol12:30671437
a9j8j154:30646983
showlangstatbar:30737416
pythonms35:30701012
pythonfmttext:30731395
pythoncmv:30739700
fixhidewlkth:30730051
hidesbindicator:30730055
pythongtdpathcf:30739705

@mjbvz mjbvz transferred this issue from microsoft/vscode May 23, 2023
@mjbvz mjbvz removed their assignment May 23, 2023
@jasonpacheco
Copy link

I'm also experiencing this issue. I have a fairly large project using version 4.9.4 of TypeScript and I'm still running an outdated of VSCode (version 1.73.1) since I get extremely poor Intellisense performance for all versions of VSCode > 1.73.1. Here's a link to my closed issue for additional reference: microsoft/vscode#168491

When using version 1.73.1 of VSCode, if I use my workspace's version of 4.9.4, my Intellisense performance is as similar as shown in the OP's issue. However, if I switch to using the shipped VSCode TypeScript version of 4.8.4, the Intellisense performance is snappy and back to the baseline level I've experienced in all VSCode versions <= 1.73.1.

@RyanCavanaugh RyanCavanaugh added the Needs Investigation This issue needs a team member to investigate its status. label Jun 14, 2023
@RyanCavanaugh RyanCavanaugh added this to the TypeScript 5.2.1 milestone Jun 14, 2023
@jakebailey
Copy link
Member

Just by nature of the version number in the title and the fact that deleting node_modules helps, I suspect this is #52535 and #52876.

@kvart714 If you set this in your settings.json, does it help?

"typescript.tsserver.watchOptions": {
    "watchFile": "fixedPollingInterval"
},

@jakebailey jakebailey added Duplicate An existing issue was already created and removed Needs Investigation This issue needs a team member to investigate its status. labels Jun 16, 2023
@typescript-bot
Copy link
Collaborator

This issue has been marked as 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes.

@typescript-bot typescript-bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

6 participants