-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tsc -w is unacceptably slow #6178
Comments
I have the same problem with 1.7.5 on Mac. In my case, it takes ~ 5 seconds before it notices that something changed. |
What version of node are you using? |
I'm using 5.2.0 but the same problem I had on 0.12.2. I have no problem with |
Just as a heads up everyone, you can go back to 1.7.3 with no user-facing issues. 1.7.5's only change was on file watching behavior which is what you're noticing. |
FWIW, I see same problem (except even slower ~ 20s delay) on Linux w/ |
I tried 1.7.3 on 5.3.0/Win and it's only marginally better: 4-5s. |
Same issue on Linux with node 0.10. Delay is about 4-5 seconds. Tried 1.7.5 and 1.7.3 - same result.
|
Same 5s delay here (ver 1.7.5 and 1.5.3 before) on mac with following tsconfig: {
"compilerOptions": {
"target": "es5",
"module": "system",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false
},
"exclude": [
"node_modules"
]
} |
Same issue tsconfig.json : {
"compilerOptions": {
"target": "ES5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false
},
"exclude": [
"node_modules",
".git"
]
} |
Same issue on linux, node 5.1.0. Fixed with 1.7.3. |
Same issue on Mac OS X 10.11. Downgrading to 1.7.3 helps partially - sometimes the watcher fires fast, most of the time there's a big delay. |
PR #6026 should address this issue. We should have this in shortly. sorry for the delay. |
Thanks for the status update @mhegazy Looking forward for th fix. This explains a slowdown I have in my angular 2 app using lite-server |
I am having slow reload with typescript 1.7+, works fine with typescript 1.6. Anybody else? |
@asadsahi this change was introduced between TS 1.7.3 and TS 1.7.5, if you are running into issues with TS 1.7.3 then it is a different issue. |
I am having same issue with typescript 1.7.3. |
@asadsahi that is a different issue then. can you provide more details? how many files do you have? can you share your configurations? |
I think it's still the same issue as many commenters pointed out. There's very little difference between 1.7.3 and 1.7.5 they're both slow compared to other watchers like gulp watch or webpack watch. |
A fix was merged in master just now and will be published tomorrow via |
@oliverjanik, @asadsahi, @stefk, @realyze, @johnpapa, @deflexor, @FlorianBELLAZOUZ, @kamilmac, @fergusg and @Olgagr can you give |
@mhegazy It's certainly better but still slow with a ~7s lag (1.7.3 is <<1s)
|
@zhengbli one reason for the still slightly slow change detection may be that "exclude": [
"node_modules"
] i.e., when I |
Is the Also, it would be of great help if you can put the error log when the |
In my case
That's what I used to generate the previously described problem: $ touch node_modules/angular2/src/facade/promise.d.ts This triggers the change detection. I'm not explicitly referencing that file anywhere. I'll try to get a sample project together... |
You could try https://github.com/fergusg/my-ng2-sandbox which is what I'm using. I'm slightly embarrassed to point you at that messy hack job (not intended for anyone but me) which is a learning pit for angular 2, but what the hell... |
@fergusg Thanks for the sample! Is this where the watching doesn't work consistently? I tried editing all |
@zhengbli Sorry, I can't reproduce reliably :-( I edit |
@zhengbli To answer your questions more explicitly:
|
I've run several tests and its very slow with TypeScript 1.7+. I wrote If I run the same thing with typescript 1.7.5 or typescript@next, it takes 20+ seconds you can repeat this by pulling the https://github.com/johnpapa/angular2-tour-of-heroes sample, UPDATE if I use
|
@johnpapa a fix for the slowness in watching mode was merged in master last week, so the one in |
i see 1.8 is in this repo, is it going to npm shortly too? |
we are closing down on 1.8 bugs. we should have something out in the next few weeks. |
ok. i saw the version here https://github.com/Microsoft/TypeScript/blob/master/package.json#L5 and got excited and confused :) |
:) we bump up the version in master once we ship to make sure that nighties have the correct version number. |
this is the issue in angular, I think that the fix is already submitted |
im on 1.8.10 and the problem continues on mac.
|
@johnpapa running |
actually never mind, much faster now :) |
I am using Node Js ver 7.8.0 and file watcher is taking loads of time recognizing my file changes. My typescript ver is 2.2.1. |
@sumant30 Can you share your tsconfig.json / OS / file system? You are using the |
Os : windows 7 & file system : NTFS & You are using the tsc -w right? : Yes And my tsconfig.json is below { |
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
The text was updated successfully, but these errors were encountered: