rendering performance • Improves initial rendering speed and memory consumption by up to 2~4x in most scenarios • benchmark Try to run the below URL https://github.com/vuejs/vue/tree/next/benchmarks
support SSR • Without third vendor library, be able to server-side rendering • In server-side, render by using the blow the APIs • renderToString • renderToStream
renderToStream • renderToString issues • Sync rendering !! • Blocking the event loop !! • renderToStream support the async rendering • Improve the performance by using the Node.js Stream
hydration • When render at server-side, marke with ”server-rendered” to HTML • After that, In client-side, run the hydrate function at the patch • guard duplication rendering • skip the diffing, and DOM building
• Static subtree skip the diffing in patch Optimization
header {{a.b}} footer
{ render: function(){with(this){ return _h(_e('div', {class:class1}), [_m(0), _h(_e('p'), [(_s(a.b))]), _m(1)]) }}, staticRenderFns: [function(){with(this){ // _m(0) return _h(_e('header'), [_t("logo")])} }, function(){with(this){ // _m(1) return _h(_e('footer', [_t("foo")])} }] } template render functions compile When first rendering completed, results of staticRenderFns is cached in Vue instance. in later, use the this cached in the patch header div p footer text text text
render tag / render option • Provide the feature that control of rendering with JavaScript • Cannot get no satisfaction to vue.js compiler • Cannot get no satisfaction to template DSL syntax • However, need to understand about the virtual-dom
Conclusion • Adopt virtual-dom • The below has become possible • Improve rendering performance • SSR • Rendering optimization • Control of rendering • More learner