-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Memory heap usage increases when importing mathjs #8832
Comments
Hmm, this is odd. Does |
Hope this might me useful for anyone who is looking into this. I ran the tests with a custom environment, jest-circus(to use This is the snapshot from the 10th test run, it looks that @SimenB A second opinion might be good. |
@SimenB https://jestjs.io/docs/en/configuration#resetmodules-boolean The memory leak caused by #8282 is only fixed when resetModules is |
I was able to reproduce this with mathjs 6.6.0 and jest 25.1.0 when running with the following command jest --detectLeaks --runInBand --no-cache --logHeapUsage With the following command, jest detects no leaks node --expose-gc ./node_modules/.bin/jest --detectLeaks --runInBand --no-cache --logHeapUsage Here is the repository I used for testing - https://github.com/terite/jest-unleak-modules |
This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 14 days. |
This issue was closed because it has been stalled for 7 days with no activity. Please open a new issue if the issue is still relevant, linking to this one. |
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. |
🐛 Bug Report
Memory heap continues to grow when importing mathjs library.
To Reproduce
Steps to reproduce the behavior:
Create several test files that import the
mathjs
library.Expected behavior
Memory heap usage should not increase or at least not as much.
Link to repl or repo (highly encouraged)
Checkout this repo.
https://github.com/keyflight/memory-mathjs-jest
Install the dependencies.
Run the following commands to compare
Run
npx envinfo --preset jest
Paste the results here:
System: OS: macOS 10.14.5 CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz Binaries: Node: 10.15.3 - /usr/local/bin/node Yarn: 1.15.2 - /usr/local/bin/yarn npm: 6.4.1 - /usr/local/bin/npm npmPackages: jest: ^24.8.0 => 24.8.0
The text was updated successfully, but these errors were encountered: