Hacker News new | ask | show | jobs
by kilowatt 4490 days ago
Have they been working on compilation speed? About a year ago I was trying some WebGL "bindings" that had definitions for all the constants and functions, and the game I was hacking on would take 20 seconds to compile on a fairly recent Macbook Air.
2 comments

It has improved in recent releases, but I think they are focusing mostly on incremental compilation via the -watch flag. My projects still take 5-7 seconds to build from scratch on my MacBook Air.

You probably know this, but just for others' information: Type inference is expensive, as it requires global information about the project. As a result, compiling one TypeScript file in a project results in the compiler recompiling all of the referenced modules and definitions to re-build up that inference information from scratch. Using the -watch flag keeps the compiler alive with that information in-tact in memory, enabling incremental recompilation.

No, it's still rather slow. We've "fixed" by doing conditional compilation (using an md5 of the files). A full compile of our project takes a few minutes.