Skip to content

perf(css): avoid constructing renderedModules#19775

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

perf(css): avoid constructing renderedModules#19775
sapphi-red merged 1 commit intovitejs:mainfrom
sapphi-red:perf/avoid-constructing-rendered-modules

Conversation

@sapphi-red
Copy link
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
Member Author

/ecosystem-ci run

@pkg-pr-new
Copy link

pkg-pr-new bot commented Apr 10, 2025

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

📝 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
18 checks passed
@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