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

Low performance on vitest version 3.0 #7275

Closed
6 tasks done
arnold095 opened this issue Jan 17, 2025 · 6 comments · Fixed by #7281
Closed
6 tasks done

Low performance on vitest version 3.0 #7275

arnold095 opened this issue Jan 17, 2025 · 6 comments · Fixed by #7281
Labels
p4-important Violate documented behavior or significantly improves performance (priority)

Comments

@arnold095
Copy link

arnold095 commented Jan 17, 2025

Describe the bug

Hello!

After upgrading vistest to the latest version, I have noticed that there is a significant drop in runtimes without having changed any additional settings.

With vitest 2.1.8

Image

After update to vitest 3.0.0

Image

Reproduction

I have a very large test battery, probably not reproducible with few tests.

#7275 (comment)

System Info

System:
    OS: macOS 15.0.1
    CPU: (8) arm64 Apple M1
    Memory: 881.17 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.9.0 - ~/.nvm/versions/node/v20.9.0/bin/node
    Yarn: 4.1.1 - ~/.nvm/versions/node/v20.9.0/bin/yarn
    npm: 10.1.0 - ~/.nvm/versions/node/v20.9.0/bin/npm
  Browsers:
    Brave Browser: 131.1.73.105
    Chrome: 131.0.6778.265
    Safari: 18.0.1

Used Package Manager

yarn

Validations

Copy link

Hello @arnold095. Please provide a minimal reproduction using a GitHub repository or StackBlitz (you can also use examples). Issues marked with needs reproduction will be closed if they have no activity within 3 days.

@sheremet-va
Copy link
Member

Interesting how tests time spiked 🤔 These are the "test" callbacks

@sheremet-va
Copy link
Member

Can you test different vitest beta versions? Does it become worse in a specific one?

@arnold095
Copy link
Author

@sheremet-va

These are the results, it seems that the performance drop originates in version 3.0.0-beta.2

With vitest 3.0.0-beta.1:
Image

With vitest 3.0.0-beta.2:
Image

Vitest 3.0.0-beta.3:
Image

Vitest 3.0.0-beta.4:
Image

Vitest 3.0.1:

Image

@sheremet-va sheremet-va added p4-important Violate documented behavior or significantly improves performance (priority) and removed needs reproduction pending triage labels Jan 17, 2025
@sheremet-va
Copy link
Member

Looks like this is the cause: #6944

@AriPerkkio
Copy link
Member

@github-actions github-actions bot locked and limited conversation to collaborators Feb 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p4-important Violate documented behavior or significantly improves performance (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants