microsoft / vscode

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

Editor randomly freezes when input code in .html or .ts files #132853

Closed trubachoff closed 3 years ago

trubachoff commented 3 years ago

In process explorer tsserver and angular template heavily load cpu

Issue Type: Performance Issue

VS Code version: Code 1.60.0 (e7d7e9a9348e6a8cc8c03f877d39cb72e5dfb1ff, 2021-09-01T10:43:02.136Z) OS version: Linux x64 5.11.0-34-generic snap Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz (8 x 4200)| |GPU Status|2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|3, 3, 3| |Memory (System)|31.29GB (7.75GB free)| |Process Argv|--no-sandbox --force-user-env --unity-launch --crash-reporter-id 6450d428-e36b-4902-9d5f-f962b9e3800e| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|ubuntu| |XDG_CURRENT_DESKTOP|Unity| |XDG_SESSION_DESKTOP|ubuntu| |XDG_SESSION_TYPE|x11|
Process Info ``` CPU % Mem MB PID Process 0 160 1151008 code main 0 32 1151010 zygote 0 128 1278340 gpu-process 0 32 1151011 zygote 0 64 2082555 window (Issue Reporter) 0 32 1151042 utility 1 481 1151059 window (Settings - storum-frontend (Workspace) - Visual Studio Code) 16 288 1151153 extensionHost 0 96 1151292 /snap/code/73/usr/share/code/code /snap/code/73/usr/share/code/resources/app/extensions/html-language-features/server/dist/node/htmlServerMain --node-ipc --clientProcessId=1151153 14 801 1151302 /snap/code/73/usr/share/code/code /home/user/.vscode/extensions/angular.ng-template-12.2.0/server --logToConsole --ngProbeLocations /home/user/.vscode/extensions/angular.ng-template-12.2.0,/home/user/projects/public-storum-frontend --tsProbeLocations /home/user/.vscode/extensions/angular.ng-template-12.2.0,/home/user/projects/public-storum-frontend --node-ipc --clientProcessId=1151153 0 96 1151386 electron_node eslintServer.js 0 64 1151396 /snap/code/73/usr/share/code/code /snap/code/73/usr/share/code/resources/app/extensions/json-language-features/server/dist/node/jsonServerMain --node-ipc --clientProcessId=1151153 16 320 1152404 electron_node tsserver.js 0 288 1152405 electron_node tsserver.js 0 64 1152439 electron_node typingsInstaller.js typesMap.js 3 352 1152406 electron_node tsserver.js 0 64 1208495 /snap/code/73/usr/share/code/code /snap/code/73/usr/share/code/resources/app/extensions/css-language-features/server/dist/node/cssServerMain --node-ipc --clientProcessId=1151153 0 64 1151200 watcherService 0 64 1754167 searchService 0 128 1151166 shared-process 0 64 1151187 ptyHost 0 0 1151243 /usr/bin/zsh 0 32 1249281 npm run dev:ssr 0 0 1249309 sh -c ng run storum-public-v1:serve-ssr 0 1922 1249310 ng run storum-public-v1:serve-ssr 0 0 1954877 /bin/sh -c node "/home/user/projects/public-storum-frontend/dist/storum-public-v1/server/main.js" 0 96 1954878 node /home/user/projects/public-storum-frontend/dist/storum-public-v1/server/main.js 0 0 2085612 /bin/sh -c /usr/bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command= 0 0 2085613 /usr/bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command= ```
Workspace Info ``` | Window (Settings - storum-frontend (Workspace) - Visual Studio Code) | Folder (public-storum-frontend): 1389 files | File types: ts(533) scss(165) html(140) svg(123) png(110) jpg(20) | json(13) js(12) map(11) ico(2) | Conf files: tsconfig.json(2) launch.json(1) package.json(1) | tslint.json(1) | Launch Configs: chrome(2); ```
Extensions (21) Extension|Author (truncated)|Version ---|---|--- ng-template|Ang|12.2.0 angular-schematics|cyr|5.0.0 vscode-eslint|dba|2.1.25 githistory|don|0.6.18 gitlens|eam|11.6.0 EditorConfig|Edi|0.16.4 vscode-npm-script|eg2|0.3.22 prettier-vscode|esb|8.1.0 file-icons|fil|1.0.29 todo-tree|Gru|0.0.214 Angular2|joh|12.0.0 git-graph|mhu|1.30.0 import-sorter|mik|3.3.1 vscode-typescript-next|ms-|4.5.20210908 vscode-sorting-attrs|rba|1.0.6 vscode-typograf|rus|0.3.0 autoimport|ste|1.5.4 vim|vsc|1.21.7 vscode-todo-highlight|way|1.0.4 JavaScriptSnippets|xab|1.8.0 material-theme|zhu|3.11.4 (1 theme extensions excluded)
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383cf:30185419 pythonvspyt700cf:30270857 pythonvspyt602:30300191 vspor879:30202332 vspor708:30202333 vspor363:30204092 pythonvspyt639:30300192 pythontb:30283811 pythonvspyt551cf:30345471 pythonptprofiler:30281270 vsdfh931:30280409 vshan820:30294714 vstes263:30335439 pythondataviewer:30285071 pythonvsuse255:30340121 vscod805:30301674 pythonvspyt200:30340761 vscextlangct:30333562 binariesv615:30325510 vsccppwt:30329788 pythonvssor306:30344512 bridge0708:30335490 pygetstartedc2:30360494 bridge0723:30353136 pythonrunftest32:30361774 pythonf5test824cf:30361778 javagetstartedt:30351793 pythonvspyt187cf:30362783 pydsgsc2:30361791 vscus224cf:30358040 vssid140cf:30363604 ```
IllusionMH commented 3 years ago

/needsMoreInfo

Is it reproducible with all extensions disabled? Expecially vim extension? You can try this with F1 and >Developer: Reload Window With Extensions Disabled

trubachoff commented 3 years ago

/needsMoreInfo

Is it reproducible with all extensions disabled? Expecially vim extension? You can try this with F1 and >Developer: Reload Window With Extensions Disabled

Yes, I'm disable extensions. When disable typescript extension the problem goes away.

trubachoff commented 3 years ago

I read a solution to a similar problem: the solution is to disable the proprietary Nvidia driver. I'll check now.

deepak1556 commented 3 years ago

Please provide the output of ps -eo pcpu,pid,user,args or any other similar commands showing the cpu usage from the code process, thanks!