Skip to content

Conversation

edison1105
Copy link
Member

@edison1105 edison1105 commented Feb 13, 2025

close #7947
Allow users to clear the SSR compile cache, such as through a node-cron scheduled task, to release memory. Using lru cache might help alleviate continuous memory growth, but it cannot completely prevent the OOM issue.

Copy link

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 102 kB (+314 B) 38.4 kB (+125 B) 34.6 kB (+128 B)
vue.global.prod.js 160 kB (+400 B) 58.3 kB (+194 B) 51.9 kB (+223 B)

Usages

Name Size Gzip Brotli
createApp (CAPI only) 47.1 kB (+161 B) 18.5 kB (+60 B) 16.9 kB (+83 B)
createApp 55.7 kB (+256 B) 21.6 kB (+120 B) 19.7 kB (+127 B)
createSSRApp 59.9 kB (+262 B) 23.3 kB (+130 B) 21.2 kB (+108 B)
defineCustomElement 60.5 kB (+256 B) 23.2 kB (+119 B) 21.1 kB (+116 B)
overall 69.8 kB (+272 B) 26.7 kB (+110 B) 24.3 kB (+147 B)

Copy link

pkg-pr-new bot commented Feb 13, 2025

Open in Stackblitz

@vue/compiler-core

npm i https://pkg.pr.new/@vue/compiler-core@12868

@vue/compiler-sfc

npm i https://pkg.pr.new/@vue/compiler-sfc@12868

@vue/compiler-dom

npm i https://pkg.pr.new/@vue/compiler-dom@12868

@vue/compiler-ssr

npm i https://pkg.pr.new/@vue/compiler-ssr@12868

@vue/runtime-core

npm i https://pkg.pr.new/@vue/runtime-core@12868

@vue/runtime-dom

npm i https://pkg.pr.new/@vue/runtime-dom@12868

@vue/reactivity

npm i https://pkg.pr.new/@vue/reactivity@12868

@vue/server-renderer

npm i https://pkg.pr.new/@vue/server-renderer@12868

@vue/shared

npm i https://pkg.pr.new/@vue/shared@12868

vue

npm i https://pkg.pr.new/vue@12868

@vue/compat

npm i https://pkg.pr.new/@vue/compat@12868

commit: 5177f16

@edison1105 edison1105 changed the base branch from minor to main February 13, 2025 01:44
@edison1105 edison1105 changed the base branch from main to minor February 13, 2025 01:44
@edison1105 edison1105 added ✨ feature request New feature or request version: minor ready for review This PR requires more reviews labels Feb 13, 2025
@edison1105 edison1105 linked an issue Feb 24, 2025 that may be closed by this pull request
Copy link
Contributor

@alex-snezhko alex-snezhko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should a similar function be exposed for the compileCache used in packages/vue/src/index.ts -> compileToFunction?

@edison1105
Copy link
Member Author

Probably not needed, SSR needs it because the compileCache is retained in the server process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review This PR requires more reviews ✨ feature request New feature or request version: minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow disabling or clearing of compile cache in SSR render

2 participants