tests run 3x slower than Jest
See original GitHub issueDescribe the bug
Tests run 3x slower than Jest for me.
Reproduction
vitest: https://github.com/sachinraja/zod-to-ts/tree/vitest jest: https://github.com/sachinraja/zod-to-ts/tree/main
System Info
System:
OS: Linux 5.15 Pop!_OS 21.10
CPU: (8) x64 Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
Memory: 5.03 GB / 15.44 GB
Container: Yes
Shell: 5.8 - /usr/bin/zsh
Binaries:
Node: 16.11.1 - ~/.asdf/installs/nodejs/16.11.1/bin/node
Yarn: 1.22.15 - ~/.asdf/installs/nodejs/16.11.1/.npm/bin/yarn
npm: 8.0.0 - ~/.asdf/plugins/nodejs/shims/npm
Browsers:
Brave Browser: 96.1.33.106
Firefox: 95.0
npmPackages:
vite: 2.7.4 => 2.7.4
vitest: 0.0.100 => 0.0.100
Used Package Manager
pnpm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn’t already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (15 by maintainers)
Top Results From Across the Web
Vitest runs tests 3x slower than Jest with threads: true (default ...
With Jest, it takes 30 to 40 seconds. With Vitest, it takes 130 to 150 seconds. Roughly 3 to 4 times slower, which...
Read more >Vitest is fast, jest is faster * - DEV Community
Vitest runs tests 3x slower than Jest with threads: true · Coverage is very slow on large projects.
Read more >With CRA upgrade from 3.4.1 to 4.0.3 tests are running much ...
the tests are 3x slower when run with runInBand , they take approx. 1700 seconds compared to approx. 600 seconds before the update;;...
Read more >Troubleshooting - Jest
Normally Jest parallelizes test runs across processes but it is hard to debug many processes at the same time. Debugging in VS Code....
Read more >Node Testing Frameworks: The Good, the Bad, the Slow and ...
Jest requires more than 3x more memory than average · AVA has the worst memory performance, but adequate to unmatched speed (individual tests...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@sachinraja Tests are taking ~800ms now. And with threads disabled ~650ms.
I saw that threads are slower too. Alter checking it with nodejs profiler I can see that workers are idling a lot. Will investigate where bottleneck is.