TypeScript Version: 2.1.1 / nightly (2.2.0-dev.201xxxxx)
As described in http://stackoverflow.com/questions/36624273/investigating-long-typescript-compile-times, untyped generics can cause the TypeScript compiler to spend significantly more time type checking. It would be extremely useful to have the diagnostics report expensive type inference.
Code
This is copied from the StackOverflow example
// slow:
// ...
.flatMap((receivedObj: MyType) => {
let nextObservable: Observable<MySecondType> = this.dependingPut(receivedObj);
return nextObservable || new Observable((observer) => {
observer.next(undefined);
});
});
// fast:
.flatMap((receivedObj: MyType) => {
let nextObservable: Observable<MySecondType> = this.dependingPut(receivedObj);
return nextObservable || new Observable<MySecondType>((observer) => { // <--- use the generics!
observer.next(undefined);
});
});
Expected behavior:
Display costly type inference when diagnostics mode is enabled. Running git bisect to find performance bottlenecks is prohibitively difficult with a significantly large code base.
Actual behavior:
Only time checking is reported when using the diagnostics flag.
TypeScript Version: 2.1.1 / nightly (2.2.0-dev.201xxxxx)
As described in http://stackoverflow.com/questions/36624273/investigating-long-typescript-compile-times, untyped generics can cause the TypeScript compiler to spend significantly more time type checking. It would be extremely useful to have the diagnostics report expensive type inference.
Code
This is copied from the StackOverflow example
Expected behavior:
Display costly type inference when diagnostics mode is enabled. Running
git bisectto find performance bottlenecks is prohibitively difficult with a significantly large code base.Actual behavior:
Only time checking is reported when using the diagnostics flag.