-
-
Notifications
You must be signed in to change notification settings - Fork 116
perf(runtime-vapor): use setAttr
or setDOMProp
instead of setDynamicProp
when possible
#291
perf(runtime-vapor): use setAttr
or setDOMProp
instead of setDynamicProp
when possible
#291
Conversation
✅ Deploy Preview for vapor-repl ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Hi! I'm the It looks like you correctly set up a CI job that uses the autofix.ci GitHub Action, but the autofix.ci GitHub App has not been installed for this repository. This means that autofix.ci unfortunately does not have the permissions to fix this pull request. If you are the repository owner, please install the app and then restart the CI workflow! 😃 |
Size ReportBundles
Usages
|
Open in Stackblitz • playground @vue/compiler-core
@vue/compiler-dom
@vue/compiler-ssr
@vue/compiler-vapor
@vue/compiler-sfc
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/runtime-shared
@vue/runtime-vapor
@vue/server-renderer
@vue/shared
vue
@vue/compat
@vue/vapor
commit: |
❌ Deploy Preview for vapor-template-explorer failed. Why did it fail? →
|
✅ Deploy Preview for vapor-template-explorer ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
setAttr
for attributes that must be set as attirbutesetAttr
or setDOMProp
instead of setDynamicProp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Thanks
setAttr
or setDOMProp
instead of setDynamicProp
setAttr
or setDOMProp
instead of setDynamicProp
when possible
the
setDynamicProp
function internally checks whether thekey
isclass
,style
,event
each time, which increases runtime overhead. This PR optimizes the process to minimize the use ofsetDynamicProp
by:setAttr
for attributes that must be set withsetAttribute
setDOMProp
for global HTML attributes, global Svg attributes, and global MathML attributes.div,span,p,table,h1-h6
do not have additional attributes beyond the global HTML attributes.