Skip to content
This repository was archived by the owner on Mar 19, 2026. It is now read-only.
This repository was archived by the owner on Mar 19, 2026. It is now read-only.

Vite 8.0.0-beta.9 dev server uses ~4x more memory than Vite 5.4.21 #577

@yeion7

Description

@yeion7

Describe the bug

Hey team! First off, thanks for all the work on Vite 8 and Rolldown — really excited about the new architecture!

I noticed something while testing the beta: Vite 8.0.0-beta.9 seems to be using significantly more memory than Vite 5.4.21 when running the same project. I ran both versions side-by-side to compare, and wanted to share my findings in case it's helpful.

Vite 5.4.21 + esbuild (running for 4 days):

Process Memory
Vite dev server (app-a) 170 MB
Vite dev server (app-b) 127 MB
esbuild 127 MB
esbuild 96 MB
Total ~520 MB

Vite 8.0.0-beta.9 + Rolldown:

Process Memory Uptime
Vite dev server (app-a) 1,142 MB ~37 seconds
Vite dev server (app-a child?) 45 MB ~37 seconds
Vite dev server (app-b) 598 MB ~7 hours
Total ~1.8 GB

The key finding: Vite 8 uses 1.1GB after just 37 seconds of running, while Vite 5 stays at ~520MB after 4 days of continuous use. This suggests it's not a gradual memory leak, but rather a very high baseline memory consumption.

The app-b process at 598 MB after 7 hours also suggests there may be some memory growth over time on top of the high baseline.

I'm not sure if this is expected due to the new Rolldown architecture, or if there might be room for optimization. Thought I'd flag it either way!

Reproduction

I can't share the exact repo, but it's a React + TypeScript monorepo with:

  • 2 separate apps (entry points)
  • ~500+ components
  • Standard dependencies (React, React Router, etc.)

This should be reproducible with any medium-to-large React project by comparing Vite 5.x vs 8.0.0-beta.9.

Steps to reproduce

  1. Run vite dev server with version 5.4.21 on a medium/large project
  2. Run vite dev server with version 8.0.0-beta.9 on the same project
  3. Monitor memory usage with top or Activity Monitor immediately after startup
  4. Compare memory consumption — the difference should be visible within seconds

Expected behavior

I'd expect memory usage to be roughly similar between versions — or ideally better with Rolldown!

Actual behavior

Vite 8.0.0-beta.9 uses about 1.1GB within the first minute of startup, compared to ~300MB for Vite 5.4.21. That's roughly 4x more memory for the same project right from the start.

System Info

System:
    OS: macOS 14.5
    CPU: Apple M1 Pro
    Memory: 16 GB
  Binaries:
    Node: 22.21.1
  npmPackages:
    vite: 8.0.0-beta.9 (comparison against 5.4.21)

Used Package Manager

bun

Validations

Additional context

I saw that vitejs#21451 (event emitter leak) was fixed in beta.9 — nice catch! The high memory usage still persists though, so there might be other areas worth looking into.

Also came across vitejs#20155 (HMR memory leak) which might be related to the gradual growth I observed in longer-running processes.

Happy to provide more details or run additional tests if that would help. Thanks again for all your work on this! 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions