TypeScript: TSServer High CPU usage

  • VSCode Version: 1.32.3
  • OS Version: Fedora 29

Steps to Reproduce:

  1. Install clean stable VSCode with neo extensions or setting
  2. Open large project with sub projects
  3. Check System Monitor -> HIGH CPU Usage, almost non usable OS

I tried to turn off some settings, but nothing help. It caused by TSServer.js build-in “TypeScript and JavaScript Language Features” extension.

Solution: Disable “TypeScript and JavaScript Language Features” build-in extensions.

Screenshot from 2019-03-21 11-18-59 Screenshot from 2019-03-21 11-19-27 Screenshot from 2019-03-21 11-19-56

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

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 24
  • Comments: 29 (7 by maintainers)

Most upvoted comments

Have the same issue on MacOS Mojave. Using this as a workaround -

  1. Disable the default javascript validation - "javascript.validate.enable": false
  2. Use the external ESLint extension - https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint

@cushmatt can you please try typescript@next to see if the issue still repros… We made some changes to directory watching for Linux and it might have fixed the issue with the files being watched… If the issue still repros, please share new tsserver log with the latest build when the issue repros to be able to investigate this further

@kasik96 From your shared log it seems like file watcher being invoked too many times and is suppose to be a file not found… Enabling --traceResolution might give you why this file is being requested. It seems like that location is directory in the package and not file.

Info 179  [20:40:57.774] FileWatcher:: Triggered with /home/jsdev/Work/hidden-clients-js/node_modules/socks/typings 0:: WatchInfo: /home/jsdev/Work/hidden-clients-js/node_modules/socks/typings 500 Project: /dev/null/inferredProject1* WatchType: Missing file

Info 180  [20:40:57.774] FileWatcher:: Close:: WatchInfo: /home/jsdev/Work/hidden-clients-js/node_modules/socks/typings 500 Project: /dev/null/inferredProject1* WatchType: Missing file

@mjbvz Same problem, did not help.