Skip to content

2.6 takes a very long time to --watch on large projects #19253

Closed
@JoshuaKGoldberg

Description

@JoshuaKGoldberg

TypeScript Version: 2.6.0-rc

Code

# Where tsconfig.json includes hundreds of .ts files (~400 on my smallest repro project)
tsc -w tsconfig.json
{
    "compilerOptions": {
        "declaration": true,
        "experimentalDecorators": true,
        "jsx": "react",
        "noImplicitAny": true,
        "noImplicitReturns": true,
        "noImplicitThis": true,
        "noResolve": true,
        "pretty": true,
        "sourceMap": true,
        "target": "es5"
    },
    "include": [...]
}

Expected behavior:

After adding an unused public method to a class, it should eventually finish compilation.

Actual behavior:

After >10 minutes of waiting a few times, I've terminated the process. I've also tried reinstalling 2.6.0-rc.

Side note: on a smaller project of 28 items, with identical tsconfig settings (except that strictNullChecks is on), recompilation from adding an unused public method to a class went from ~1000ms average over 5 runs to 1500ms average (measured from the time TS outputs the File_change_detected_Starting_incremental_compilation diagnostic to the time it outputs the Compilation_complete_Watching_for_file_changes diagnostic).

The code isn't open source so I can't post it here, but I have emailed a few TypeScript team members instructions on how to get to it before (Office Sway).

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issueHigh Priority

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions