Skip to content
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

Reporter performance regression 0.34.x - 1.0.0 #4710

Closed
6 tasks done
AriPerkkio opened this issue Dec 9, 2023 · 0 comments · Fixed by #4711
Closed
6 tasks done

Reporter performance regression 0.34.x - 1.0.0 #4710

AriPerkkio opened this issue Dec 9, 2023 · 0 comments · Fixed by #4711

Comments

@AriPerkkio
Copy link
Member

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.

image

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.

image

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.2

Used Package Manager

pnpm

Validations

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant