Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very slow incremental compilation in watch mode vs TSServer runtime check #12012

Closed
hippich opened this issue Nov 2, 2016 · 2 comments
Closed
Labels
Duplicate An existing issue was already created

Comments

@hippich
Copy link

hippich commented Nov 2, 2016

TypeScript Version: 2.x

Code

{
  "description": "This tsconfig file is used to build the main application",
  "compilerOptions": {
    "target": "es5",
    "module": "amd",
    "baseUrl": ".",
    "paths": {
      "*": ["app/*", "app/vendor/*", "app/components/*"]
    },
    "declaration": false,
    "removeComments": false,
    "noLib": false,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "sourceMap": true,
    "pretty": true,
    "allowUnreachableCode": false,
    "allowUnusedLabels": false,
    "noImplicitAny": true,
    "noImplicitReturns": false,
    "noImplicitUseStrict": false,
    "noFallthroughCasesInSwitch": true,
    "moduleResolution": "node",
    "outDir": "build/develop"
  },
  "files": [
    "app/app.d.ts",
    "app/unit_test.d.ts"
  ],
  "include": [
    "app/**/*.*"
  ],
  "exclude": [
    "app/vendor/**/*.*"
  ],
  "compileOnSave": false
}

Actual behavior:

We have pretty large typescript project and rely on watch mode of typescript to compile changes as we develop and save these. Problem is - incremental compilation takes very long time.

What is interesting is that TSServer returns errors almost immediately (I am using VIM plugin tsuquyomi.) I know that originally reason to parse everything is to make sure output is consistent, but may be it makes sense to introduce "light" checks which verifies only currently changed file(s)?

Files:          1521
Lines:        337399
Nodes:       1925827
Identifiers:  596716
Symbols:      383096
Types:        146778
Memory used: 952291K
I/O read:      0.60s
I/O write:     1.26s
Parse time:    6.58s
Bind time:     2.19s
Check time:   11.63s
Emit time:     8.83s
Total time:   29.25s
4:58:38 PM - Compilation complete. Watching for file changes.
4:58:49 PM - File change detected. Starting incremental compilation...
Files:           1521
Lines:         337398
Nodes:        1925827
Identifiers:   596716
Symbols:       383096
Types:         146778
Memory used: 1032513K
I/O read:       0.00s
I/O write:      0.30s
Parse time:     2.75s
Bind time:      0.02s
Check time:    12.24s
Emit time:     14.05s
Total time:    29.06s
4:59:18 PM - Compilation complete. Watching for file changes.
@normalser
Copy link

FYI #10879

@mhegazy
Copy link
Contributor

mhegazy commented Jan 31, 2017

Please find relevant discussions in #13538

@mhegazy mhegazy added the Duplicate An existing issue was already created label Jan 31, 2017
@mhegazy mhegazy closed this as completed Apr 21, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

3 participants