tsc -w is unacceptably slow
I'm on windows. Typescript version installed via npm is 1.7.5. When I do tsc -w typescript watches for changes but its change detection is really slow. I takes about 10s before it notices I made a change and then recompiles.
What could be causing this?
Edit: Node 5.3.0
@oliverjanik, @asadsahi, @stefk, @realyze, @johnpapa, @deflexor, @FlorianBELLAZOUZ, @kamilmac, @fergusg and @Olgagr can you give typescript@next a try, and let us know if the issue has been resolved?
@mhegazy It's certainly better but still slow with a ~7s lag (1.7.3 is <<1s)
Version 1.8.0-dev.20160114
@fergusg the fix was just merged, so it wouldn't be published until tomorrow on typescript@next. Could you try again tomorrow or build from TypeScript master if you are willing to? Thank you! It is expected that changes should be detected instantly.
@zhengbli @mhegazy No probs - but I might need a fresh poke to remember!
@mhegazy, @zhengbli, the problem is solved for me, changes are detected instantly (built from master).
got "typescript": "1.8.0-dev.20160114" installed, but I am experiencing same amount of time (~ 5-6 sec on my machine) unfortunately. Am I missing something? Its quick (~1-2 s) with v1.6 though.
Was just about to try this myself - doesn't look like the nightly for today built:
$ npm show typescript
...
'1.8.0-dev.20160111': '2016-01-11T07:05:35.365Z',
'1.8.0-dev.20160112': '2016-01-12T07:05:55.664Z',
'1.8.0-dev.20160113': '2016-01-13T07:05:48.663Z',
'1.8.0-dev.20160114': '2016-01-14T07:07:42.963Z' },
...
CC @DanielRosenwasser
@asadsahi, @myitcv, looking at previous build times, it seems the nightly build won't be available before a few hours (it's 1:30 AM on the west coast). You should try building from source.
@stefk - these times are UTC, hence the build would ordinarily have completed by now.
@oliverjanik, @asadsahi, @stefk, @realyze, @johnpapa, @deflexor, @FlorianBELLAZOUZ, @kamilmac, @fergusg and @Olgagr
now a new nightly was published via typescript@next, can you give it a try? version:
[email protected]
Updated to "[email protected]" just now, and tried. It took 12 sec to detect a change to a file. I have maybe twenty .ts files that it is watching.
I've just tried @next 1.8.0-dev.20160115 and it doesn't seem to detect any changes.
@fergusg @offsky I just found that there is a bug if you have file names with upper case letters. Is that the case for you guys?
@zhengbli no uppercase for me. All lower+hyphen aaa-bbb-ccc.ts
Same for me. All files in the form aaa-bbb-ccc.ts
@fergusg @offsky I created a new tsc.js at https://gist.github.com/zhengbli/0e63584b3daf3b521671
Would you mind to try again? Sorry for the hassle.
Your gist works great. Sub second file change detection.
@offsky thanks for testing! the fix is merged, should be in tomorrow's nightly.
@zhengbli I've just tried 1.8.0-dev.20160116 which seems to work mostly well - very fast change detection, though not instant (but <1s). But sometimes it seems to stop detecting changes (e.g., I've been modding a file and tsc -w detects those changes and then suddenly stop doing so, no matter what changes I made. Restarting tsc -w works.)
I can't make it fail consistently, though - I'll have a play to see if I can.
@zhengbli one reason for the still slightly slow change detection may be that tsc -w still seems to be watching ./node_modules dir, even though tsconfig.json has
"exclude": [
"node_modules"
]
i.e., when I touch a .ts file in node_modules, I get change detection.