performance problem: --declaration and --outFile very slow
TypeScript Version: 1.8.2
I'm using --outFile, --module system and --declaration. It's very very slow (almost 15-20 seconds).
Diagnostics: Files: 129 Lines: 49208 Nodes: 202105 Identifiers: 74553 Symbols: 3657523 Types: 16087 Memory used: 179859K I/O read: 0.04s I/O write: 0.07s Parse time: 0.72s Bind time: 0.40s Check time: 1.89s Emit time: 0.57s Total time: 3.58s
total time shown in diagnostics is not real, it takes almost 15-20 seconds to complete If I remove declaration generation times are close to 3.5s we find on diagnostics. If I don't use --outFile, performance gets good again
I don't know if it's a good approach, but I'm trying to separate a big project into a smaller one, that's why I'm using this for development purposes
tsconfig.ts is:
{
"compilerOptions": {
"module": "system",
"jsx": "react",
"target": "es5",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"noImplicitAny": true,
"rootDir": ".",
"noEmitOnError": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"outFile": "dist/albatross.js",
"declaration": true,
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": true,
"forceConsistentCasingInFileNames": true
},
"exclude": [
"dist"
]
}
what OS are your running on? what version of node are you using?
out of curiosity does time got improved if you omit noEmitOnError option?
what OS are your running on? what version of node are you using? I'm on Windows 10, node v5.7.0
out of curiosity does time got improved if you omit noEmitOnError option? Yes, just tried that, problem resolved w/out noEmitOnError. Any clue?
thanks for reporting this issue! fix is checked in and should be available in today's nightly bits: typescript@next on npm.
Also on nuget: https://github.com/Microsoft/TypeScript/wiki/Nightly-drops#using-nuget-with-msbuild
StackOverflow issue for reference: http://stackoverflow.com/questions/35608986/medium-large-typescript-projects-build-performance-problems