Closed tscpp closed 3 months ago
This is the benchmarks from running a test multiple times. The first test is cold and the others are hot.
✓ Analyzer > Reports diagnostic 'TS2345' [696.37ms]
✓ Analyzer > Reports diagnostic 'TS2345' [418.74ms]
✓ Analyzer > Reports diagnostic 'TS2345' [366.30ms]
✓ Analyzer > Reports diagnostic 'TS2345' [375.33ms]
✓ Analyzer > Reports diagnostic 'TS2345' [337.32ms]
✓ Analyzer > Reports diagnostic 'TS2345' [334.73ms]
✓ Analyzer > Reports diagnostic 'TS2345' [332.34ms]
✓ Analyzer > Reports diagnostic 'TS2345' [330.94ms]
A quick fix for this would be to make sure the legacy compiler can transpile multiple files at the same time.
The legacy compiler is really slow because it creates multiple instances of the typescript compiler host and program for each file. The compiler package is still dependant on the legacy compiler to build the typescript source file. The legacy compiler needs to be optimized.