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

Vitest UI very slow with large modules graph #1602

Closed
6 tasks done
MPeloquin opened this issue Jul 5, 2022 · 3 comments · Fixed by #1719
Closed
6 tasks done

Vitest UI very slow with large modules graph #1602

MPeloquin opened this issue Jul 5, 2022 · 3 comments · Fixed by #1719
Labels
feat: ui Vitest UI

Comments

@MPeloquin
Copy link
Contributor

Describe the bug

I have an app with a large module graph, and when I run vitest --ui, the ui is very unresponsive, even if I don't have the modules tab opened.

When I uncheck the two checkboxes, then the ui is reponsive again
CleanShot 2022-07-05 at 16 30 03

I don't use these modules graphs, it would be nice if having the tab closed would not affect the performance of the UI.

See video:

CleanShot.2022-07-05.at.16.33.56.mp4

Reproduction

https://github.com/MPeloquin/VitestUiSlowModules

Module graph is larger than the one I have on my app, but the issue is the same, UI becomes very slow.

System Info

System:
    OS: macOS 12.3.1
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
    Memory: 413.05 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.18.0 - ~/.nvm/versions/node/v14.18.0/bin/node
    Yarn: 1.22.17 - /usr/local/bin/yarn
    npm: 6.14.15 - ~/.nvm/versions/node/v14.18.0/bin/npm
  npmPackages:
    @vitejs/plugin-react: ^1.2.0 => 1.3.2 
    vite: ^2.9.9 => 2.9.9 
    vitest: ^0.17.0 => 0.17.0

Used Package Manager

pnpm

Validations

@userquin
Copy link
Member

userquin commented Jul 8, 2022

running the dev script in the repo, the browser is failing (circular reference: 200+ modules)

@DerYeger can you take a look at the repro?, my laptop with 64GB of RAM cannot load it (there are 200+ modules)

@MPeloquin
Copy link
Contributor Author

@userquin I removed circular references and reduces the number of modules dependencies a bit, let me know. Thanks

@DerYeger
Copy link
Member

running the dev script in the repo, the browser is failing (circular reference: 200+ modules)

@DerYeger can you take a look at the repro?, my laptop with 64GB of RAM cannot load it (there are 200+ modules)

Sorry for the late response.

I just tried the repro, and it is definitely very slow, though I can open it.

The graph view is active/alive while other tabs are selected, to prevent the graph from resetting every time the tab is selected.

For module graphs of this size an interactive graph view is probably not the right choice in the first place.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feat: ui Vitest UI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants