This project is read-only.


1.0RC compiler is ~40% slower


As also seen by @oocx in the Reviews, the 1.0RC compiler is notably slower than in 0.9.5.

I'm on a very small and new project, and compiling using the NPM package with Grunt, and compile times immediately went from a consistent range of 3.4-3.8s to 5.0-5.4s. Not so bad with a project of this size, but certainly a big leap if the ratio was consistent in larger projects.

Let me know if there's anything I can provide - though I won't be able to share much code due to company restrictions etc.

file attachments

Closed Mar 31, 2014 at 6:09 PM by RyanCavanaugh
We've implemented some perf improvements in the release-1.0.1 branch. If anyone could give them a shot and post their results (in the forum) that'd be helpful. Thanks!


danquirk wrote Feb 28, 2014 at 5:53 PM

If anyone who is seeing this sort of issue can share an affected project with us (you can do so privately without having to let everyone else access it) it would be extremely helpful to track down a root cause. We do have a number of projects of various sizes (including some very large ones) we use to test that our performance goals are met (which certainly includes not regressing performance like this) but they obviously can't represent all possible project and code structures.

paulb wrote Mar 1, 2014 at 11:55 PM

Can you compile with both 0.9.5 and 0.9.7 with the --diagnostics flag? and attach the output for both?

oocx wrote Mar 3, 2014 at 8:30 AM

Yes. Here is the output for 0.9.5

oocx wrote Mar 3, 2014 at 8:31 AM

... and here for 0.9.7

MarcusWhit wrote Mar 3, 2014 at 10:20 AM

Yes, see attached tscDiagnostics.txt

willdean wrote Mar 28, 2014 at 12:16 PM

I doubt it's any real use, but if you're looking at the y = mx+c of compile times, here's what the 'c' looks like on my machine with 0.97 (i7, lots of memory):

The file hello.ts consists of one line:

alert("Hello, world");

C:\temp\tstest>tsc --diagnostics hello.ts

File resolution time: 14
       file read:                     13
    scan imports:                     0
   import search:                     0
    get lib.d.ts:                     1
SyntaxTree parse time: 365
Syntax Diagnostics time: 183
AST translation time: 561

Type check time: 5329

Emit time: 0
Declaration emit time: 0
Total number of symbols created: 29746
Specialized types created: 149
Specialized signatures created: 112
IsExternallyVisibleTime: 0
TypeSignatureTime: 0
GetBoundDeclTypeTime: 0
IsOverloadedCallSignatureTime: 0
FunctionDeclarationGetSymbolTime: 0
GetBaseTypeTime: 0
GetAccessorFunctionTime: 0
GetTypeParameterSymbolTime: 0
GetImportDeclarationSymbolTime: 0
Emit write file time: 2
Compiler resolve path time: 1
Compiler directory name time: 0
Compiler directory exists time: 0
Compiler file exists time: 0
IO host resolve path time: 1
IO host directory name time: 0
IO host create directory structure time: 0
IO host write file time: 1
Node make directory time: 0
Node writeFileSync time: 0
Node createBuffer time: 0