Skip to content

TSServer updates entire project when adding a new file #38210

Closed
@VincentBailly

Description

@VincentBailly

When using { "include" : ["."] } in tsconfig, TSServer takes a lot of time when adding a new file compared to when using { "files": ["./index.ts"] }.
It would be tedious to have to maintain a list of exported modules in tsconfig.json simply to get faster refactoring experience.

TypeScript Version: 3.9.0-dev.20200427

Search Terms:

VSCode
IntelliSense
Include
Files
TSServer

Code

See repro here

Expected behavior:

When adding a new file to a project the amount of work done by TSServer is independent of the amount of code present in the project.

Actual behavior:

When using { "include": ["."] } adding a new file seems to trigger a lot of work for TSServer, and this work seems to depend on the amount of code already in this project.
Note that this does not happen when we use { "files": ["./index.ts"] }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions