Replies: 1 comment
-
|
It's not expected that it uses significantly more memory. But I don't think we can find out the reason without any memory profile or a reproduction. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
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):
Vite 8.0.0-beta.9 + Rolldown:
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:
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
vitedev server with version 5.4.21 on a medium/large projectvitedev server with version 8.0.0-beta.9 on the same projecttopor Activity Monitor immediately after startupExpected 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
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! 🙏
Beta Was this translation helpful? Give feedback.
All reactions