Very slow compilation

Topics: General
Dec 15, 2013 at 10:43 AM
Edited Dec 15, 2013 at 10:45 AM
I'm building a node.js project using TypeScript. I'm not using Visual Studio for this. I have about 70-80 .ts files and around 25000 lines of code and there are some complex code paths due to heavy use of promises (via the Q library). My project takes almost 30 seconds to compile, which, for this size of project, is frustratingly slow, given (a) the lack of intellisense and (b) the fact that I'm making frequent changes that I need to test. I know the VS plugin provides intellisense, but it's based on the TypeScript compiler and so is of course still extremely slow to update given that my project is so slow to compile. As a result, I'm using Sublime Text instead.

To the TypeScript dev team - is there any way I can provide you with a copy of my project (just the TS files and the command line I use to compile? Would this help you find some of the performance issues with the compiler? There are a couple of files in my project that compile much, much slower than all the rest, and they are literally only a few hundred lines of source. I don't know what's special about them, but they would perhaps provide an opportunity to see "code in the wild" that is causing problems for the compiler.
Coordinator
Dec 16, 2013 at 5:21 PM
The best way to help us repro is to file an issue with the issue tracker, and provide some of the slow-compiling files as attachments onto the issue. That way we can try to work out what patterns seem to be giving the compiler trouble.

Out of curiosity - what version of TypeScript are you using?
Dec 16, 2013 at 8:01 PM
Ok I will try to isolate the problem code down to a small subset and open an issue for it.

I'm using 0.9.5, though the performance seems pretty on par with 0.9.1[.1].
Dec 16, 2013 at 9:42 PM