Skip to content

TSServer high cpu usage #30004

@Alexand3r

Description

@Alexand3r
  • VSCode Version: 1.31.1
  • OS Version: Kubuntu 18.04

Steps to Reproduce:
These steps reproduce under heavy load:

  1. Press Control + Space to trigger Intellisense to autocomplete something(Or any action that triggers a request to TSServer)
  2. Cancel the request by moving the cursor somewhere else

I've also tested it with both with trace: verbose and off (thinking it might be just me having "typescript.tsserver.trace": "verbose" on TSServer)

TSServer creates an empty file under /tmp/vscode-typescript/tscancellation-session.tmpLastFileNumber

When files start to pile up, TSServer starts to lag/freeze, have very long delays in responding requests and making VSCode also unresponsive or slow and causing horrible CPU Spikes.

Removing those files restores VScode's speed and TSServer resolves requests under 200ms

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

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions