Skip to content

perf(css): avoid constructing renderedModules - #19775

Merged
sapphi-red merged 1 commit into
vitejs:mainfrom
sapphi-red:perf/avoid-constructing-rendered-modules
Apr 10, 2025
Merged

sapphi-red merged 1 commit into
vitejs:mainfrom
sapphi-red:perf/avoid-constructing-rendered-modules

Conversation

@sapphi-red

Copy link
Copy Markdown
Member

Description

The previous code collected all modules to an object for each chunk. It is inefficient because only some modules are actually accessed, especially when the project is large. It somehow does not cause performance problems with normal Vite, but it was degrading performance with Rolldown-Vite.
This makes the code to avoid creating the big object.

refs #19678

@sapphi-red sapphi-red added the p2-nice-to-have Not breaking anything but nice to have (priority) label Apr 2, 2025
@sapphi-red

Copy link
Copy Markdown
Member Author

/ecosystem-ci run

@pkg-pr-new

pkg-pr-new Bot commented Apr 10, 2025

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/vite@19775

commit: 7f4b16d

@vite-ecosystem-ci

This comment has been minimized.

@vite-ecosystem-ci

This comment was marked as outdated.

@vite-ecosystem-ci

Copy link
Copy Markdown

📝 Ran ecosystem CI on 7f4b16d: Open

suite result latest scheduled
laravel ❌ failure ✅ success
storybook ❌ failure ❌ failure
vite-environment-examples ✅ success ❌ failure
vike ✅ success ❌ failure
vite-plugin-react ✅ success ❌ failure
waku ✅ success ❌ failure

✅ ladle, analogjs, nuxt, astro, rakkas, quasar, marko, histoire, previewjs, react-router, qwik, unocss, vite-plugin-pwa, vitepress, vite-plugin-react-swc, sveltekit, vite-setup-catalogue, vite-plugin-vue, vitest, vite-plugin-cloudflare, vite-plugin-svelte, vuepress

@sapphi-red
sapphi-red merged commit 59d0b35 into vitejs:main Apr 10, 2025
@sapphi-red
sapphi-red deleted the perf/avoid-constructing-rendered-modules branch April 10, 2025 09:46
moonlitusun pushed a commit to moonlitusun/vite that referenced this pull request May 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p2-nice-to-have Not breaking anything but nice to have (priority) trigger: preview

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants