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

chore(shared): Call an existing simpler function to determine the raw type #13126

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

drylint
Copy link

@drylint drylint commented Apr 1, 2025

A simpler function exists to determine the raw type of a value, replacing toTypeString() with toRawType().

@edison1105
Copy link
Member

edison1105 commented Apr 1, 2025

Thanks for the PR. Will this change improve performance?
If so, please provide a benchmark.
If not, it's not worth it.

@drylint
Copy link
Author

drylint commented Apr 1, 2025

Thanks for the PR. Will this change improve performance? If so, please provide a benchmark. If not, it's not worth it.

It has almost no effect on performance, and all it does is reduce the length of the literal string (tens of characters) and, if anything, reduce the size of the package by a little.

Copy link

github-actions bot commented Apr 1, 2025

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 100 kB (-45 B) 38.1 kB (-5 B) 34.3 kB (-20 B)
vue.global.prod.js 158 kB (-45 B) 58.2 kB (-5 B) 51.9 kB (+14 B)

Usages

Name Size Gzip Brotli
createApp (CAPI only) 46.4 kB (-9 B) 18.1 kB (-4 B) 16.6 kB (-7 B)
createApp 54.4 kB (-27 B) 21.2 kB (-5 B) 19.4 kB (-14 B)
createSSRApp 58.6 kB (-27 B) 22.9 kB (-3 B) 20.9 kB (-5 B)
defineCustomElement 59.2 kB (-27 B) 22.7 kB (-5 B) 20.7 kB (-11 B)
overall 68.4 kB (-36 B) 26.3 kB (-3 B) 24 kB (-47 B)

Copy link

pkg-pr-new bot commented Apr 1, 2025

Open in StackBlitz

@vue/compiler-core

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

@vue/compiler-dom

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

@vue/compiler-sfc

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

@vue/compiler-ssr

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

@vue/reactivity

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

@vue/runtime-core

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

@vue/runtime-dom

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

@vue/server-renderer

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

@vue/shared

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

vue

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

@vue/compat

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

commit: c132c80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants