vitest
vitest copied to clipboard
Memory Leak with threads enabled
Describe the bug
When setting threads: true (the default) a full rebuild (as happens when you press ctrl+s in the config file) leaks memory. The amount of memory is proportional to the amount of test files/source files present.
Reproduction
Here is a minimal reproduction that uses a very large snapshot to inflate memory usage.
- Run
vitestand make sure to have threads enabled - Navigate to the
vite.config.tsfile and pressctrl+smany times - See the memory usage of the
nodeprocess increase
System Info
System:
OS: macOS 12.4
CPU: (8) arm64 Apple M1
Memory: 1023.63 MB / 8.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.14.2 - ~/Library/Caches/fnm_multishells/73424_1648464793541/bin/node
Yarn: 3.0.1 - ~/.yarn/bin/yarn
npm: 8.5.0 - ~/Library/Caches/fnm_multishells/73424_1648464793541/bin/npm
npmPackages:
vite: ^2.8.6 => 2.8.6
vitest: ^0.6.0 => 0.6.0
Used Package Manager
yarn
Validations
- [X] Follow our Code of Conduct
- [X] Read the Contributing Guidelines.
- [X] Read the docs.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- [X] The provided reproduction is a minimal reproducible example of the bug.
I experience the exact same issue.
any updates regarding this issue?