Skip to content

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

@cpojer

Description

@cpojer

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions