We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
从 Vue3源码 来看,Vue3 性能提升主要从”响应式、编译、源码体积“三个方面来实现的。
静态标记,从源码编译角度来对比分析Vue2、Vue3:
<div id="app"> <div> static node </div> <div> {{ count }} </div> </div>
Vue2 render编译后:
Vue2 没有做静态标记,静态节点执行render函数,仍会创建vdom,进行diff。
Vue3 render编译后:
Vue3做了静态提升,静态节点会被标记为 -1,表示不进行diff;动态节点才进行diff。
参考:Vue template explorer
The text was updated successfully, but these errors were encountered:
No branches or pull requests
从 Vue3源码 来看,Vue3 性能提升主要从”响应式、编译、源码体积“三个方面来实现的。
一、响应式升级
二、编译优化
静态标记,从源码编译角度来对比分析Vue2、Vue3:
Vue2 render编译后:
Vue3 render编译后:
三、源码体积优化
The text was updated successfully, but these errors were encountered: