4 ms·
Agreed, TypeScript is great, but the compiler is excruciatingly slow. I have to segment my app into multiple sub-build areas and only build a subset at a time,
by axefrog 13y ago
Agreed, TypeScript is great, but the compiler is excruciatingly slow. I have to segment my app into multiple sub-build areas and only build a subset at a time, which is annoying because I frequently end up making small changes outside of that subset of code. My app is only around 25000 lines of code and a full compilation still takes around 50-60 seconds which, in a JavaScript workflow, is a lot of friction.
- camus2 13y agoAgreed, TypeScript is great, but the compiler is excruciatingly slow. This. at least the js one. Maybe VS is bundled with a Typescript compiler written in C# , i dont know,but clearly the javascript one is damn slow.
- dmck 13y agoVisual Studio uses the same compiler written in TypeScript/JavaScript. The Visual Studio integration is done in C# but only for interop with the Visual Studio APIs, there is only one version of the TypeScript compiler. I know when Palantir was developing Eclipse tools for TypeScript they posted to the Codeplex project regarding performance issues and the team from MS responded with suggestions about caching and only recompiling the minimal targets necessary.
- rplnt 13y agoI was expecting something in the order of minutes. Seeing as I work at a place where full build used to took about three hours on a server. I see how it's not ideal though.
- prawks 13y agoIn a typical Javascript workflow, near-instant feedback is the baseline. I really like how Facebook's Hack has a local file system monitor which incrementally compiles on file changes. I haven't used it yet, but it sounds like a nearly ideal compromise.
- rictic 13y agoTypescript has a command line option for this as well. As far as I can tell, the language would also support a non-validating mode that would be more or less instantaneous (the transformations it performs are all local, and none of them involve knowledge of the types involved).
- prawks 13y agoNeat, I'll need to look into that.
- Spiritus 13y agoI've never actually used TypeScript until today, but just the tutorial code takes forever to compile, this snippet took 2 seconds for example, whaaat?? interface Person { firstname: string; lastname: string; } function greeter(person: Person) { return 'Hello, ' + person.firstname + ' ' + person.lastname; } var user = {firstname: 'John', lastname: 'Doe'} document.body.innerHTML = greeter(user); It's a shame really, because it looks like a really cool project.
- wildpeaks 13y agoIt seems there is a minimum time of 2 seconsd to compile anything because even a simple console.log('Hello'); one-liner also takes 2 seconds.
- rpwverheij 13y agoIt takes under 5 seconds for me to compile my project of about 5000 lines. So it's not really a problem for me yet, though I agree it would be if the waitingtime where to become any longer. Besides that, I've also been really enjoying developing in Typescript!
- jeremiep 13y agoSame here for a project three times this size. Still I find it extremely slow compared to CoffeeScript I was using before. I'm used to saving the file and instantly refreshing the browser/rebooting node.js.
- olegbl 13y agoStrange, I'm able to compile 12k lines of code (that's output) in 5.2 seconds. Running this on a watch + autoreload process, so 6 seconds after I hit save, the results show up in my web browser. I do remember 0.9.1 being excruciatingly slow though. Edit: forgot to mention, I'm using the NPM package