I am using TypeScript 2.2.1 and I am experiencing a long compilation time when doing tsc
, so I added the --diagnostics
hoping it can give me more information. However, I noticed the "Total time" reported is not accurate to the time I observed.
For example, when I run
$ date && tsc --diagnostics && date
Wed, Mar 22, 2017 1:21:41 PM
Files: 200
Lines: 25865
Nodes: 91671
Identifiers: 30796
Symbols: 32727
Types: 8447
Memory used: 64572K
I/O read: 0.07s
I/O write: 0.02s
Parse time: 1.17s
Bind time: 0.30s
Check time: 0.97s
Emit time: 0.16s
Total time: 2.61s
Wed, Mar 22, 2017 1:22:52 PM
Since the start time was 1:21:41 PM and finish time was 1:22:52 PM, I was hoping the total time reported in tsc
would be about ~1 min, but it was showing 2.61s which is not correct.
Is there a better way to trace the compilation time in tsc?
Not sure why, but we found out the long compilation time was due to this line in the tsconfig.json
"extends": "../tsconfig",
After removing it, the long compilation time was resolved.