-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Compiler OOM in watch mode and with --d #21140
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
Comments
Can you try |
@mhegazy thanks for the awesome support. In In TS 2.6 it seems that the OOM exception only occurs on certain files (but there it does occur reliably). On other files the incremental watch works, but is slow (10+ seconds for a change that affects the local scope of a single function). Running MacOS. Trace (although don't expect it to be useful) is:
I've reached out internally to see if we can give you access with an NDA. Will follow up when I hear back. |
@aldendaniels Just want to make sure you dont run into this exception when you run tsc without watch option? |
@sheetalkamat That's correct. The exception only occurs in watch mode. |
@mhegazy To circle back on getting a repo - preference on our end would be to start digging on a screen-share to get a repro before granting access to the repo due to possible overhead on getting the NDA signed on both ends. Let me know if this is something you'd be open to and thanks for the help regardless. It's worth noting that this issue isn't critical for us, because the IDE integration still works as well as the non-watch mode. We don't make heavy use of watch internally ATM. |
I think we can arrange for a screen sharing session. |
Nice - thank you! Email is alden [at] coda [dot] io. Should be available to jump on a call during west-coast business hours. |
Fixed for me with |
@aldendaniels can you give a try to typescript@next to see if your issue still repros? If the issue still repros can you also try out environment variables and options as mentioned in #21243 to see if any of that helps? |
@sheetalkamat For starters, my baseline behavior as changed. We've upgraded to I tried on
|
@sheetalkamat Looks like that issue is fixed but there's still no build out - please let me know when the build is out and I'll retry |
@aldendaniels looks like there's a new version |
@Bnaya thanks for the heads up. Looks like we get a new error now:
|
@aldendaniels The bug for the exception you were seeing, just got fixed. Please try out build that will be released tonight. |
@sheetalkamat Good news! Will do. |
Getting |
@aldendaniels were you able to try the latest build out to see if the issue is fixed. Thanks |
Sorry, thanks for the ping. Now I'm getting this on
|
@aldendaniels Can you run |
@weswigham sorry for the delay - this is what I get:
It looks like the OOM error might be preventing other useful logging. |
Yeah, that OOM isn't related to declarations or watch mode at all (and it runs oom while still typechecking) - without a repro it's going to be incredibly hard to debug! Then again, you said the project was >2700 files, right? Projects of that size are usually incredibly sensitive to increased memory usage on our part (even slightly) because they're already at or near the process limit. Does the project compile if you run the compiler with more memory allocated to node? (eg, |
@weswigham Yes, pumping the memory allotment for node does the trick. Sorry for the red herring. I'd been using an alias a coworker had added for the normal run, so I didn't realize we'd bumped the memory requirement until running in watch mode. You're correct that this isn't watch-mode related.
This would be great. Generally, typescript performance is becoming painful for us. We migrated from flow to typescript sometime back - it's been a good conversion on several fronts, but performance has been inferior - admittedly it's not an apples-to-apples comparison as we we've typed more code since the conversion. Still, we noticed the difference immediately. I realize that our project is larger than most and there's optimizations we can make by compartmentalizing our builds, etc. Examples include:
I realize there's no easy fix (feel free to close this issue) but thought I'd drop the feedback as you evaluate prioritization choices. |
@aldendaniels we would love to get access to your sources and debug more to see what is causing the OOM issues. we would be happy to sign an NDA as needed. |
@mhegazy Thank you! This would be great. Can you shoot me an email (alden at coda dot io) and we can take it from there? |
my email is |
Thanks! Moved to email. |
@aldendaniels are you still hitting this? mhegazy no longer works on TypeScript so we'll need to get a fresh copy of the repro if so |
Process is running out out of memory on TS
2.6.2
in watch mode.To reproduce:
tsc --noemit --watch --project .
The process hangs for a minute or so, then crashes with a node out-of-memory exception.
This does not appear to be related to strict generic checks (see #19662), as the exception still occurs when running
tsc --noemit --watch --noStrictGenerics --project .
(presuming that the--noStrictGenerics
flag overrides the.tsconfig
).This is possibly a dup of #19253. It's a large project (2700+ files) and we're hitting performances challenges generally so project size is likely a factor. I can't share the project as the code is proprietary, but would be happy to jump on a screen share to further diagnose if that would be helpful.
cc: @mhegazy
The text was updated successfully, but these errors were encountered: