microsoft / vscode

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

TypeScript and JavaScript Language Features #130984

Closed lexxwork closed 3 years ago

lexxwork commented 3 years ago

Issue Type: Performance Issue

after vscode update experience a high load cpu if "TypeScript and JavaScript Language Features" builtin extention enabled

VS Code version: Code 1.59.0 (379476f0e13988d90fab105c5c19e7abc8b1dea8, 2021-08-04T23:13:20.182Z) OS version: Linux x64 5.4.0-80-generic Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz (8 x 3192)| |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)|2, 2, 2| |Memory (System)|11.62GB (0.26GB free)| |Process Argv|. --crash-reporter-id f35ec7ca-84c1-443f-9fde-a3fb5e570bb6| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|budgie-desktop| |XDG_CURRENT_DESKTOP|Budgie:GNOME| |XDG_SESSION_DESKTOP|budgie-desktop| |XDG_SESSION_TYPE|x11|
Process Info ``` CPU % Mem MB PID Process 0 167 7791 code main 0 36 7795 zygote 0 95 7826 gpu-process 0 36 7796 zygote 0 0 7798 zygote 0 83 49184 window (Issue Reporter) 0 59 7844 utility 0 131 7922 shared-process 0 59 7945 ptyHost 0 0 8037 /bin/bash 0 0 49204 /bin/sh -c /bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command= 0 0 49205 /bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command= 0 309 36952 window (ads-stream.js - hls-lab - Visual Studio Code) 0 178 36990 extensionHost 0 83 37044 /usr/share/code/code /usr/share/code/resources/app/extensions/json-language-features/server/dist/node/jsonServerMain --node-ipc --clientProcessId=36990 0 59 37336 /usr/local/bin/node /home/lexx/.vscode/extensions/dbaeumer.vscode-eslint-2.1.23/server/out/eslintServer.js --node-ipc --clientProcessId=36990 0 107 48227 electron_node tsserver.js 0 59 37013 watcherService 0 59 37054 searchService ```
Workspace Info ``` | Window (ads-stream.js - hls-lab - Visual Studio Code) | Folder (hls-lab): 82 files | File types: ts(30) m3u8(15) js(10) json(6) editorconfig(1) gitignore(1) | md(1) yaml(1) html(1) sh(1) | Conf files: launch.json(1) settings.json(1) tasks.json(1) | jsconfig.json(1) package.json(1) | Launch Configs: node(2); ```
Extensions (40) Extension|Author (truncated)|Version ---|---|--- vscode-m3u|af4|1.0.0 TabOut|alb|0.2.0 vscode-color|ans|0.4.5 htmltagwrap|bra|0.0.7 vscode-tailwindcss|bra|0.6.13 bracket-pair-colorizer|Coe|1.0.61 transformer|dak|1.11.2 vscode-eslint|dba|2.1.23 breakpointio|dec|0.0.1 xml|Dot|2.5.1 gitlens|eam|11.6.0 EditorConfig|Edi|0.16.4 json-tools|eri|1.0.2 prettier-vscode|esb|8.1.0 html-slim-scss-css-class-completion|gen|1.7.8 Python-autopep8|him|1.0.2 beautify|Hoo|1.5.0 rest-client|hum|0.24.5 vscode-edit-csv|jan|0.6.0 dupchecker|jia|0.1.7 csharpfixformat|Leo|0.0.84 vscode-csproj|luc|0.7.0 python|ms-|2021.8.1105858891 vscode-pylance|ms-|2021.8.1 jupyter|ms-|2021.8.1195043623 remote-containers|ms-|0.191.0 remote-ssh|ms-|0.65.7 remote-ssh-edit|ms-|0.65.7 remote-wsl|ms-|0.58.2 vscode-remote-extensionpack|ms-|0.21.0 cpptools|ms-|1.5.1 vscode-typescript-next|ms-|4.5.20210816 debugger-for-chrome|msj|4.12.12 vetur|oct|0.34.1 material-icon-theme|PKi|4.9.0 vscode-commons|red|0.0.6 vscode-xml|red|0.18.0 vue-vscode-snippets|sdr|2.2.1 language-stylus|sys|1.13.0 JavaScriptSnippets|xab|1.8.0 (2 theme extensions excluded)
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383:30185418 pythonvspyt602:30300191 vspor879:30202332 vspor708:30202333 vspor363:30204092 vstes516:30244333 pythonvspyt639:30300192 pythontb:30283811 pythonptprofiler:30281270 vsdfh931:30280409 vshan820:30294714 vstes263:30335439 pythondataviewer:30285071 pythonvsuse255:30340121 vscod805:30301674 pythonvspyt200:30340761 vscextlang:30333561 binariesv615:30325510 vsccppwt:30329788 pythonvssor306:30344512 bridge0708:30335490 vstre464:30350172 bridge0723:30353136 ```
lexxwork commented 3 years ago

-have disabled all installed extensions -been downgrade subsequently to 1.58.2, 1.58.1, 1.57.1, 1.56.1 - and still get the same symptoms i think it's a system problem but i don't know what to inspect

mjbvz commented 3 years ago

Does this reproduce in the latest VS Code insiders build with all extensions disabled?

lexxwork commented 3 years ago

vscode 1.60.0-insider vscode 1.60.0-insider

mjbvz commented 3 years ago

Does this happen for every project you open? Can you share the project that causes this issue?

lexxwork commented 3 years ago

It happens only if I have .jsconfig.json in project with such content:

{
  "compilerOptions": {
    "module": "commonjs",
    "target": "es2020",
    "checkJs": false
  },
  "exclude": ["node_modules"]
}
mjbvz commented 3 years ago

Can you share the project that causes this?

lexxwork commented 3 years ago

I have figured out the problem I have added video files with .ts extension and this is subject. I have solved the problem excluding folders, thank you for support ) The issue can be closed.

mjbvz commented 3 years ago

Great find!

This is actually being tracked upstream by https://github.com/microsoft/TypeScript/issues/21136