microsoft / vscode

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

CPU increases 5% for each VSCode instance #152491

Closed haintwork closed 1 year ago

haintwork commented 2 years ago

Issue Type: Performance Issue

When I open new VSCode instance, I notice that CPIU cost 5% even doing nothing

VS Code version: Code 1.68.1 (Universal) (30d9c6cd9483b2cc586687151bcbcd635f373630, 2022-06-14T12:52:13.188Z) OS version: Darwin arm64 21.3.0 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|Apple M1 Max (10 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
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled| |Load (avg)|4, 4, 4| |Memory (System)|64.00GB (8.16GB free)| |Process Argv|--crash-reporter-id c0dccbbe-11de-44f3-8ab0-51605d5b6562| |Screen Reader|no| |VM|0%|
Process Info ``` CPU % Mem MB PID Process 14 328 44260 code main 0 131 44263 gpu-process 0 66 44266 utility-network-service 0 262 44539 shared-process 0 66 44541 ptyHost 0 66 48150 fileWatcher 0 0 48231 /bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command= 0 459 47584 window (CreateInvoice.jsx — factorem-portal — src/pages/CreateInvoice.jsx) 48 393 48149 extensionHost 0 131 48158 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper --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/h_/1rqbdn45665_v3lwfp1phmr80000gn/T/vscode-typescript501/6ea0eedcf70f3e0eb8b7/tscancellation-b0f0d0446382db92e50e.tmp* --globalPlugins @vsintellicode/typescript-intellicode-plugin --pluginProbeLocations /Users/hainguyen/.vscode/extensions/visualstudioexptteam.vscodeintellicode-1.2.21 --locale en --noGetErrOnBackgroundUpdate --validateDefaultNpmLocation --useNodeIpc 0 721 48159 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper --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/h_/1rqbdn45665_v3lwfp1phmr80000gn/T/vscode-typescript501/6ea0eedcf70f3e0eb8b7/tscancellation-54691232b1ae8240e3ce.tmp* --globalPlugins @vsintellicode/typescript-intellicode-plugin --pluginProbeLocations /Users/hainguyen/.vscode/extensions/visualstudioexptteam.vscodeintellicode-1.2.21 --locale en --noGetErrOnBackgroundUpdate --validateDefaultNpmLocation --useNodeIpc 0 131 48168 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper --ms-enable-electron-run-as-node /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typingsInstaller.js --globalTypingsCacheLocation /Users/hainguyen/Library/Caches/typescript/4.7 --enableTelemetry --typesMapLocation /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typesMap.json --validateDefaultNpmLocation 0 66 48165 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper --ms-enable-electron-run-as-node /Users/hainguyen/.vscode/extensions/formulahendry.auto-rename-tag-0.1.10/packages/server/dist/serverMain.js --node-ipc --clientProcessId=48149 0 66 48181 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper --ms-enable-electron-run-as-node /Users/hainguyen/.vscode/extensions/dbaeumer.vscode-eslint-2.2.2/server/out/eslintServer.js --node-ipc --clientProcessId=48149 0 131 48186 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper --ms-enable-electron-run-as-node /Users/hainguyen/.vscode/extensions/streetsidesoftware.code-spell-checker-2.2.4/packages/_server/dist/main.js --node-ipc --clientProcessId=48149 2 66 48228 issue-reporter ```
Workspace Info ``` | Window (CreateInvoice.jsx — factorem-portal — src/pages/CreateInvoice.jsx) | Folder (factorem-portal): 366 files | File types: jsx(192) js(75) png(26) json(3) ico(3) css(3) DS_Store(2) | html(2) map(2) yml(2) | Conf files: dockerfile(2) makefile(1) package.json(1); ```
Extensions (34) Extension|Author (truncated)|Version ---|---|--- rainbow-brackets|2gu|0.0.6 better-comments|aar|3.0.0 Bookmarks|ale|13.3.0 vscode-eclipse-keybindings|alp|0.16.1 jest-snippets|and|1.8.0 tabulous|bwi|1.2.0 turbo-console-log|Cha|2.3.2 npm-intellisense|chr|1.4.2 gitignore|cod|0.7.0 vscode-eslint|dba|2.2.2 tsimportsorter|doz|7.4.19 es7-react-js-snippets|dsz|4.4.3 gitlens|eam|12.1.1 vscode-html-css|ecm|1.13.0 prettier-vscode|esb|9.5.0 vscode-jest-runner|fir|0.4.48 auto-close-tag|for|0.5.14 auto-rename-tag|for|0.1.10 git-graph|mhu|1.30.0 color-highlight|nau|2.5.0 indent-rainbow|ode|8.3.1 advanced-new-file|pat|1.2.2 material-icon-theme|PKi|4.18.1 vscode-xml|red|0.20.0 code-settings-sync|Sha|3.4.3 indenticator|Sir|0.7.0 js-jsx-snippets|sky|11.0.0 autoimport|ste|1.5.4 code-spell-checker|str|2.2.4 snippets|tah|2.2.0 vscodeintellicode|Vis|1.2.21 vscode-todo-highlight|way|1.0.5 vscode-import-cost|wix|3.3.0 JavaScriptSnippets|xab|1.8.0 (1 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 pythonvspyl392:30443607 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscorecescf:30445987 pythondataviewer:30285071 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593:30376534 vsc1dst:30438360 pythonvs932:30410667 wslgetstarted:30449410 vscscmwlcmt:30465135 cppdebug:30492333 vsclangdc:30486549 ```
deepak1556 commented 1 year ago

Does the issue repro with --disable-extensions ?

tamuratak commented 1 year ago

Might be duplicate of https://github.com/microsoft/vscode/issues/147707

vscodenpa commented 1 year ago

Hey @deepak1556, this issue might need further attention.

@haintwork, you can help us out by closing this issue if the problem no longer exists, or adding more information.

vscodenpa commented 1 year ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!