Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(reactivity): trigger item directly instead of storing in an array first #11695

Merged
merged 8 commits into from
Sep 10, 2024

Conversation

zhangenming
Copy link
Contributor

No description provided.

Copy link

github-actions bot commented Aug 23, 2024

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 100 kB (-44 B) 37.7 kB (-20 B) 33.9 kB (-42 B)
vue.global.prod.js 159 kB (-44 B) 57.6 kB (-19 B) 51.2 kB (-8 B)

Usages

Name Size Gzip Brotli
createApp 55.3 kB (-44 B) 21.3 kB (-27 B) 19.4 kB (-31 B)
createSSRApp 59.3 kB (-44 B) 22.9 kB (-26 B) 20.9 kB (-18 B)
defineCustomElement 60.1 kB (-44 B) 22.8 kB (-39 B) 20.7 kB (-24 B)
overall 69.1 kB (-44 B) 26.3 kB (-25 B) 24 kB (-29 B)

Copy link

pkg-pr-new bot commented Aug 23, 2024

Open in Stackblitz

@vue/compiler-core

pnpm add https://pkg.pr.new/@vue/compiler-core@11695

@vue/compiler-dom

pnpm add https://pkg.pr.new/@vue/compiler-dom@11695

@vue/compiler-ssr

pnpm add https://pkg.pr.new/@vue/compiler-ssr@11695

@vue/reactivity

pnpm add https://pkg.pr.new/@vue/reactivity@11695

@vue/compiler-sfc

pnpm add https://pkg.pr.new/@vue/compiler-sfc@11695

@vue/runtime-dom

pnpm add https://pkg.pr.new/@vue/runtime-dom@11695

@vue/runtime-core

pnpm add https://pkg.pr.new/@vue/runtime-core@11695

@vue/server-renderer

pnpm add https://pkg.pr.new/@vue/server-renderer@11695

@vue/shared

pnpm add https://pkg.pr.new/@vue/shared@11695

vue

pnpm add https://pkg.pr.new/vue@11695

@vue/compat

pnpm add https://pkg.pr.new/@vue/compat@11695

commit: 8eda1cc

@zhangenming zhangenming changed the title pref(reactivity): trigger item directly instead of storing in an array first perf(reactivity): trigger item directly instead of storing in an array first Aug 23, 2024
@edison1105
Copy link
Member

Could you please provide a benchmark to show how much performance has improved?

@zhangenming
Copy link
Contributor Author

image
image

@zhangenming
Copy link
Contributor Author

image
image
no need 'Array.push'

Optimized the above three items
But there was little difference in the results
But But the code structure is clearer
In my opinion

@edison1105
Copy link
Member

/ecosystem-ci run

@edison1105 edison1105 added scope: reactivity 🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. labels Aug 23, 2024
@vue-bot
Copy link
Contributor

vue-bot commented Aug 23, 2024

📝 Ran ecosystem CI: Open

suite result latest scheduled
language-tools failure failure
nuxt failure failure
pinia success success
primevue success success
quasar success success
radix-vue success success
router success success
test-utils success success
vant success success
vite-plugin-vue success success
vitepress success success
vue-i18n success success
vue-macros success success
vuetify success success
vueuse success success
vue-simple-compiler success success

@edison1105 edison1105 added the ready for review This PR requires more reviews label Aug 23, 2024
@dsonet
Copy link
Contributor

dsonet commented Aug 24, 2024

It reduces the memory usage as well.

@yyx990803 yyx990803 merged commit f80d447 into vuejs:main Sep 10, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. ready for review This PR requires more reviews scope: reactivity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants