Medium large typescript projects: build performance problems

930 views Asked by At

I've been using typescript in the last 6 months and I find my code growing day by day, together with build times.

Actually it takes almost 20 seconds to build the whole project, but times are still growing.

I need to find a solution to split project and to improve build times. I created a custom build process using gulp, I used "--outfile and --declaration --module system" to reference the project from other projects (supported in typescript 1.8), but it seems that using these options together make the compiler very very slow.

Also, last project in the chain of dependencies haven't got faster, even if it had many less files to compile

Where does typescript suffer more, concerning performance? Is performance loss mainly caused by *.d.ts used?

Anyway, finally question is: What are the best practices to improve compilation performance for medium/large projects?

1

There are 1 answers

0
mohamed hegazy On BEST ANSWER

This is a known issue reported on the TypeScript issue tracker. See https://github.com/Microsoft/TypeScript/issues/7221