microsoft / vscode

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

Saving projects with prettier & copilot creates large delay before saving #183021

Closed danspratling closed 1 year ago

danspratling commented 1 year ago

Does this issue occur when all extensions are disabled?: No

Steps to Reproduce:

  1. Install Copilot & Prettier extensions
  2. Make changes on any project repeatedly for ~1h, and you should start to see the issue. This may also happen when a project is left open but inactive for a period of time.

Type: Performance Issue

VS Code version: Code 1.78.2 (Universal) (b3e4e68a0bc097f0ae7907b217c1119af9e03435, 2023-05-10T14:44:45.204Z) OS version: Darwin arm64 22.4.0 Modes: Sandboxed: No

System Info |Item|Value| |---|---| |CPUs|Apple M2 Max (12 x 24)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|8, 5, 5| |Memory (System)|32.00GB (0.10GB free)| |Process Argv|--crash-reporter-id d2d618ff-fd82-4d35-83c2-01dd8f2c74be| |Screen Reader|no| |VM|0%|
Process Info ``` CPU % Mem MB PID Process 15 164 6133 code main 0 66 6148 gpu-process 0 33 6151 utility-network-service 0 328 6153 window [1] (Tooltip.tsx — skyward-v3) 0 66 6473 shared-process 0 33 6475 ptyHost 0 0 6883 /bin/zsh -il 0 33 68924 node /usr/local/bin/pnpm dev 0 66 68932 node /Users/dan/Code/skyward-v3/node_modules/.bin/../next/dist/bin/next dev 0 852 68938 /Users/dan/.nvm/versions/node/v18.14.2/bin/node /Users/dan/Code/skyward-v3/node_modules/.pnpm/next@13.4.2_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/jest-worker/processChild.js 0 229 68940 /Users/dan/.nvm/versions/node/v18.14.2/bin/node /Users/dan/Code/skyward-v3/node_modules/.pnpm/next@13.4.2_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/jest-worker/processChild.js 0 197 68941 /Users/dan/.nvm/versions/node/v18.14.2/bin/node /Users/dan/Code/skyward-v3/node_modules/.pnpm/next@13.4.2_@babel+core@7.21.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/jest-worker/processChild.js 0 0 7036 /bin/zsh -il 0 0 73013 /bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command= 0 33 6474 fileWatcher [1] 1 98 71398 window [3] (Issue Reporter) 0 262 72318 extensionHost [1] 0 98 72332 electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node --max-old-space-size=3072 /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js --serverMode partialSemantic --useInferredProjectPerProjectRoot --disableAutomaticTypingAcquisition --cancellationPipeName /var/folders/3d/5zsqjr_d7sgdcp_0t9zy9tqm0000gn/T/vscode-typescript501/7ff066a1d0760be612c5/tscancellation-29d6e50f6275e91e02c4.tmp* --globalPlugins @astrojs/ts-plugin --pluginProbeLocations /Users/dan/.vscode/extensions/astro-build.astro-vscode-1.0.6-darwin-arm64 --locale en --noGetErrOnBackgroundUpdate --validateDefaultNpmLocation --useNodeIpc) 0 295 72333 electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node --max-old-space-size=3072 /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js --useInferredProjectPerProjectRoot --enableTelemetry --cancellationPipeName /var/folders/3d/5zsqjr_d7sgdcp_0t9zy9tqm0000gn/T/vscode-typescript501/7ff066a1d0760be612c5/tscancellation-a8fb4587253174c81983.tmp* --globalPlugins @astrojs/ts-plugin --pluginProbeLocations /Users/dan/.vscode/extensions/astro-build.astro-vscode-1.0.6-darwin-arm64 --locale en --noGetErrOnBackgroundUpdate --validateDefaultNpmLocation --useNodeIpc) 0 66 72350 electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typingsInstaller.js --globalTypingsCacheLocation /Users/dan/Library/Caches/typescript/5.0 --enableTelemetry --typesMapLocation /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typesMap.json --validateDefaultNpmLocation) 0 66 72343 electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/json-language-features/server/dist/node/jsonServerMain --node-ipc --clientProcessId=72318) 0 131 72356 electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/dan/.vscode/extensions/dbaeumer.vscode-eslint-2.4.0/server/out/eslintServer.js --node-ipc --clientProcessId=72318) 0 131 72367 electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/dan/.vscode/extensions/bradlc.vscode-tailwindcss-0.9.11/dist/tailwindServer.js --node-ipc --clientProcessId=72318) ```
Workspace Info ``` | Window (Tooltip.tsx — skyward-v3) | Folder (skyward-v3): 2862 files | File types: js(462) webp(155) json(100) pack(98) tsx(60) ts(40) mjs(30) | woff(25) txt(15) css(14) | Conf files: package.json(3) github-actions(2) settings.json(1) | project.json(1) tsconfig.json(1); ```
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vstes627:30244334 vslsvsres303:30308271 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscorecescf:30445987 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593cf:30376535 pythonvs932:30410667 cppdebug:30492333 vsclangdc:30486549 c4g48928:30535728 dsvsc012:30540252 pynewext54:30695312 azure-dev_surveyone:30548225 vsccc:30610678 2e4cg342:30602488 pyind779:30671433 89544117:30613380 vscrpc:30673769 pythonsymbol12:30671437 showlangstatbar:30737416 vsccsb:30705552 pythonms35:30701012 pythonfmttext:30731395 pythoncmv:30739700 fixshowwlkth:30730052 pythongtdpath:30739704 ```

Additionally, I could not report this issue through VSC as it took me to a 404 page.

rolanday commented 1 year ago

+1 unbearably bad, and needing to switch over to Web Storm for now, as the issue is massively affecting my productivity. Have seen similar w/o copilot as well, where prettier not only takes forever on save, but brings to a hault in-editor features like intellisense. Issue persists even if restart vs code. For anybody looking into, use a real-world code base please, not a sample boliler-plate starter project.

vscodenpa commented 1 year ago

This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in VS Code or the marketplace for VS Code. See also our issue reporting guidelines. If you don't know which extension is causing the problem, you can run Help: Start extension bisect from the command palette (F1) to help identify the problem extension.

Happy Coding!

rolanday commented 1 year ago

Way to take ownership VSCode team.

danspratling commented 1 year ago

Especially when the extension is Copilot, which is an officially supported extension (also owned by Microsoft) 🤦‍♂️