Skip to content

Commit 62772a9

Browse files
committed
feature: update readme
1 parent ff74c66 commit 62772a9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

PRINCIPLE.CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
77
提取模板中静态的 html 只需在编译期对模板结构做解析,而判断动态节点在服务端渲染阶段是否为静态,需在运行时对 VNode 做 Diff,将动态节点转化成静态 html 需要修改渲染函数的源代码,我们将这种在运行时优化服务端渲染函数的技术称作 SSR 即时编译技术(JIT)。
88

9-
## 如何 Diff VNode
9+
## JIT Diff 算法
1010

1111
首要面对的问题是如何 Diff,完成这项工作需要两个 VNode,其中一个通过 serverPrefetch / asyncData 载入动态数据,我们称之为 Dynamic VNode,另一个未载入任何数据,我们称之为 Static VNode。我们做了一个大胆的假设,对任何用户来说,Static VNode 渲染出的 html 是一致的,并且 Static VNode 是 Dynamic VNode 的子集,不同用户的差异点在 Static VNode 相对 Dynamic VNode 的补集当中。
1212

PRINCIPLE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
77
Extracting static HTML from a Vue template only requires parsing the template structure at compile time. To determine whether a dynamic node is static during the server-side rendering phase, you need to Diff the VNode at runtime. Transforming dynamic nodes into static HTML requires modifying the source code of the rendering function, and we named this technique for optimizing server-side rendering functions at runtime the SSR Just In Time Compilation (JIT)
88

9-
## How to Diff VNode
9+
## JIT Diff algorithm
1010

1111
The first issue is how to Diff, and to do this you need two VNodes, one that loads dynamic data via serverPrefetch / asyncData, which we call Dynamic VNode, and one that doesn't load any data, which we call Static VNode. we make the bold assumption that Static VNode renders consistent html for any user, and that Static VNode is a subset of Dynamic VNode, and the points of difference for different users are in the complement of Static VNode versus Dynamic VNode.
1212

0 commit comments

Comments
 (0)