title: Investigating long TypeScript compile times
body: <p>I'm investigating why the compilation time for my Angular 2.0 TypeScript project went from around 4 seconds to around 15 seconds in a relatively short time.</p>
  
  <p>I came across the very useful, but seemingly undocumented <code>--diagnostics</code> switch. </p>
  
  <p>For example, here's what I get when running <code>tsc --noEmit --diagnostics</code> on my project now:</p>
  
  <pre><code>Files:             231
  Lines:           50872
  Nodes:          170067
  Identifiers:     65994
  Symbols:       7712123
  Types:          407677
  Memory used:   600554K
  I/O read:        0.43s
  I/O write:       0.00s
  Parse time:      1.13s
  Bind time:       0.34s
  Check time:     10.17s
  Emit time:       0.00s
  Total time:     11.64s
  </code></pre>
  
  <p>Here's what I get when I run the same command on an earlier version of the project.</p>
  
  <pre><code>Files:             197
  Lines:           30882
  Nodes:          124208
  Identifiers:     46201
  Symbols:       5856945
  Types:           10989
  Memory used:    80412K
  I/O read:        0.03s
  I/O write:       0.00s
  Parse time:      0.60s
  Bind time:       0.27s
  Check time:      0.93s
  Emit time:       0.00s
  Total time:      1.79s
  </code></pre>
  
  <p>The number of <code>Types</code> has gone way up, and so has the <code>Check time</code>. </p>
  
  <p>Is it possible to get more detailed/verbose output from <code>--diagnostics</code>?</p>
  
  <p>NodeJS v4.4.3, TypeScript v1.8.10. This is my <code>tsconfig.json</code></p>
  
  <pre><code>{
    "compilerOptions": {
      "target": "es5",
      "module": "system",
      "moduleResolution": "node",
  
      "noImplicitAny": false,
      "noEmitOnError": false,
  
      "experimentalDecorators": true,
  
      "emitDecoratorMetadata": true,
      "removeComments": false
    },
    "exclude": [
      "node_modules",
      "wwwroot",
      "typings/main.d.ts",
      "typings/main"
    ]
  }
  </code></pre>