Since some days I see that the typescript compilation is becoming slower and slower. Compile a single file with webstorm file watcher took me around 1-4 sec, but I added many TS files (75 now, and I think that's not really a lot...) and the compilation time is about 10sec for a simple file.
If I need to change of branch or update a definition, it can become around 5 minutes. My computer is really powerful (game computer) and I don't get why it's becoming slow like that.
All files are compiled one by one, the webstorm way... And if the server is running at the same time with a watcher, it becomes crazy because restart maybe 50 times. (Obviously, I shut it down, but it's not really useful to have a watcher if I need to shut it down...)
Any idea? I took a look to several discussions like mine but so far I didn't really found any workaround.
You could point the file watcher to grunt task that compiles all your files in a single pass. E.g. grunt-ts : https://github.com/basarat/grunt-ts compiles all your files in one command to tsc.
PS disclosure: I am one of the authors of grunt-ts
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With