Skip to content

TSServer: performance problems after typing when using tsconfig.json in large project #2830

Closed
@dbaeumer

Description

@dbaeumer

Here is my setup

tsconfig.json with the following content:
{
"compilerOptions": {
"module": "amd",
"noImplicitAny": true,
"removeComments": false,
"preserveConstEnums": true,
"target": "ES5",
"sourceMap": false
}
}

Our workspace has around 900 ts files which are all covered by the above tsconfig.json

Steps to reproduce:

  • open any file is such a workspace
  • request completions via the tsserver
  • type a character in that file
  • request completions again.

Observe: fulfilling this request takes between 1800 and 2000 ms on my Lenevo T430s

I debugged it a little and around 90% of the time is spend in sznchronizeHostData, and there in createProgram. It looks like that all files listed in a tsconfig.json are treated as root files and changing one file flushes the whole compiler.

Metadata

Metadata

Assignees

No one assigned

    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