Skip to content

Upgrade 2.6 to 2.7 results in much longer build times #22008

Closed
@carlcraig

Description

@carlcraig

Upgrading from typescript 2.6 to 2.7 or next has resulted in builds taking twice as long.

For my project, this upgrade results in around 100,000 extra types (as seen in diagnostics below). I am unsure where these are from as the number of files is the same, or if they have any impact on build times. The check time went from 0.99s to 4.94s and 4.72s

Here are some diagnostics for each version:

Version 2.6.2

tsc -v
Version 2.6.2

tsc --diagnostics
Files:           968
Lines:        106399
Nodes:        460568
Identifiers:  164208
Symbols:      145328
Types:         15908
Memory used: 168803K
I/O read:      0.12s
I/O write:     0.10s
Parse time:    1.62s
Bind time:     0.41s
Check time:    0.99s
Emit time:     0.27s
Total time:    3.29s

Version 2.7.2

tsc -v
Version 2.7.2

tsc --diagnostics
Files:           968
Lines:        106728
Nodes:        462283
Identifiers:  164910
Symbols:      215907
Types:        115245
Memory used: 176603K
I/O read:      0.14s
I/O write:     0.11s
Parse time:    1.91s
Bind time:     0.42s
Check time:    4.94s
Emit time:     0.25s
Total time:    7.52s

Version 2.8.0-dev.20180216

tsc -v
Version 2.8.0-dev.20180216

tsc --diagnostics
Files:           968
Lines:        106798
Nodes:        462763
Identifiers:  165064
Symbols:      213277
Types:        115005
Memory used: 176834K
I/O read:      0.13s
I/O write:     0.11s
Parse time:    1.91s
Bind time:     0.38s
Check time:    4.72s
Emit time:     0.27s
Total time:    7.28s

tsconfig

{
  "compilerOptions": {
    "module": "esnext",
    "target": "esnext",
    "moduleResolution": "node",
    "jsx": "react",
    "outDir": "build",
    "baseUrl": "./",
    "rootDir": "./src",
    "paths": {
      "*": [
        "node_modules/*",
        "src/types/*"
      ]
    },
    "lib": [
      "dom",
      "dom.iterable",
      "es6",
      "scripthost",
      "es2017.object",
      "webworker"
    ],
    "sourceMap": true,
    "declaration": false,
    "importHelpers": true,
    "skipLibCheck": true,
    "allowJs": false,
    "removeComments": false,
    "noImplicitAny": true,
    "noImplicitUseStrict": true,
    "noUnusedLocals": false,
    "forceConsistentCasingInFileNames": true,
    "suppressImplicitAnyIndexErrors": true,
    "strictNullChecks": true,
    "allowSyntheticDefaultImports": true
  },
  "include": [
    "src/**/*"
  ]
}

This might be related to #21221

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs More InfoThe issue still hasn't been fully clarified

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions