-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Controlling memory usage of node-haste when loading tests #535
Comments
Here's a minimal implementation: master...jeremiahrhall:dev/node-haste-max-processes-arg |
We already have a |
The HasteModuleLoader isn't actually passed that option right now. In fact, TestRunner does not pass the second |
I ended up changing my code to use the |
That's weird. Feel free to send a Pull Request :) |
👍 |
@jeremiahrhall - did you have any luck in reducing the memory usage besides limiting |
Also check out #599, which replaces node-haste with an entirely new implementation. |
I only tried setting maxWorkers to 4 and that dropped memory usage to well below 4GB for me. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I have an app that is built in CircleCI, which has a 4GB memory limit that terminates the build when the threshold is exceeded.
My build hits this threshold when Jest runs. According to the output from CircleCI, there are 32 processes open at the time running
node-haste/lib/analyze-changed.js
, cumulatively using about 3.5GB of memory. Add in the Jest process which uses around 350mb and some OS overhead and I'm over.Jest has the
-w
option but, node-haste'smaxProcesses
option is set toos.cpus().length
inHasteModuleLoader
.Can this be made configurable?
The text was updated successfully, but these errors were encountered: