-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Describe the bug
Reporters which clear screen during logging (any non-CI reporter) can cause too much stress on main thread. Once main thread spends all its time resolving what to print on screen, it blocks new tests from starting.
During the beta releases the log-update dependency was updated to new major version. It was supposed to fix performance issues but actually it introduces some more. Downgrading log-update to previous major fixes these issues immediately.
Tip
Work-around for anyone running into this issue with 1.0.2 and below:
Switch to reporters: "basic"
Performance profiles from main thread:
v1.0.2
On top row the functions are coming from log-update and its various dependencies.
v1.0.2 after downgrading log-update
Test execution drops by 66% on the reproduction case.
See how main thread spends most of its time on idle part. That's a good thing as main thread should spend most its time just waiting for test runner threads/forks.
Reproduction
Use reproduction case from #3006.
System Info
System:
OS: macOS 14.1.2
CPU: (8) arm64 Apple M2
Memory: 2.06 GB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 18.17.1 - ~/.nvm/versions/node/v18.17.1/bin/node
Yarn: 1.22.21 - ~/.nvm/versions/node/v18.17.1/bin/yarn
npm: 9.6.7 - ~/.nvm/versions/node/v18.17.1/bin/npm
pnpm: 8.11.0 - ~/.nvm/versions/node/v18.17.1/bin/pnpm
bun: 1.0.3 - ~/.bun/bin/bun
Browsers:
Brave Browser: 116.1.57.53
Chrome: 119.0.6045.199
Safari: 17.1.2
npmPackages:
@vitest/browser: * => 1.0.2
vite: * => 5.0.0-beta.3
vitest: * => 1.0.2Used 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.

