perf: v-for fragments do not need to track dynamicChildren

This commit is contained in:
Evan You
2019-10-20 23:43:56 -04:00
parent 71f3826f99
commit 1b9bd6912e
4 changed files with 19 additions and 18 deletions

View File

@@ -71,7 +71,8 @@ export const transformFor = createStructuralDirectiveTransform(
? PatchFlags.KEYED_FRAGMENT
: PatchFlags.UNKEYED_FRAGMENT
const codegenNode = createSequenceExpression([
createCallExpression(helper(OPEN_BLOCK)),
// fragment blocks disable tracking since they always diff their children
createCallExpression(helper(OPEN_BLOCK), [`false`]),
createCallExpression(helper(CREATE_BLOCK), [
helper(FRAGMENT),
`null`,