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

3-10x slower performance in dev in Vite 5.0.3. #15177

Closed
7 tasks done
cpojer opened this issue Nov 29, 2023 · 2 comments · Fixed by #15178
Closed
7 tasks done

3-10x slower performance in dev in Vite 5.0.3. #15177

cpojer opened this issue Nov 29, 2023 · 2 comments · Fixed by #15178

Comments

@cpojer
Copy link
Contributor

cpojer commented Nov 29, 2023

Describe the bug

I updated Vite from 5.0.2 to 5.0.3 today and noticed my tests were timing out. I have custom infra using Vitest + Playwright to open a browser using Vite. Vite loads a few hundred JS files (~80k lines of code in this case) and renders some stuff with React. With Vite 5.0.3 it consistently takes 3-10x longer to load those webpages.

Here is a video: https://github.com/vitejs/vite/assets/13352/96ea4de5-2ed0-4f1f-8776-16fc30b4cc67

The first load is via Vite 5.0.2 and takes about 1.5-2 seconds. Then I upgrade to Vite 5.0.3, restart Vite and load the page again twice. Both times it takes 5-10 seconds. I don't know how to debug this further, and will appreciate any help to troubleshoot the issue and come up with a consistent repro.

Reproduction

CleanShot.2023-11-29.at.19.47.44.mp4

Steps to reproduce

TODO

System Info

Latest mac OS with latest version of every possible package.

Used Package Manager

pnpm

Logs

No logs.

Validations

@patak-dev
Copy link
Member

@sapphi-red we discussed in Discord and @cpojer found that reverting:

fixes this regression for him.

@cpojer
Copy link
Contributor Author

cpojer commented Nov 29, 2023

I can confirm that 5.0.4 does not have the same performance problem. Thank you for the quick turnaround as always 😍

@github-actions github-actions bot locked and limited conversation to collaborators Dec 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants