Commit 0ed8f349 authored by Fatih Acet's avatar Fatih Acet

Merge branch '48982-mr-refactor-improve-performance-by-setting-v-once' into 'master'

Resolve "MR Refactor: Improve performance by setting v-once"

Closes #48982

See merge request gitlab-org/gitlab-ce!20468
parents 53760e8d 56cbff35
...@@ -145,6 +145,7 @@ export default { ...@@ -145,6 +145,7 @@ export default {
@click.stop="handleToggle" @click.stop="handleToggle"
/> />
<a <a
v-once
ref="titleWrapper" ref="titleWrapper"
:href="titleLink" :href="titleLink"
class="append-right-4" class="append-right-4"
......
...@@ -189,6 +189,7 @@ export default { ...@@ -189,6 +189,7 @@ export default {
</button> </button>
<a <a
v-if="lineNumber" v-if="lineNumber"
v-once
:data-linenumber="lineNumber" :data-linenumber="lineNumber"
:href="lineHref" :href="lineHref"
> >
......
...@@ -117,14 +117,6 @@ export default { ...@@ -117,14 +117,6 @@ export default {
<template> <template>
<td <td
v-if="isContentLine"
:class="lineType"
class="line_content"
v-html="normalizedLine.richText"
>
</td>
<td
v-else
:class="classNameMap" :class="classNameMap"
> >
<diff-line-gutter-content <diff-line-gutter-content
......
...@@ -94,11 +94,12 @@ export default { ...@@ -94,11 +94,12 @@ export default {
:is-hover="isHover" :is-hover="isHover"
class="diff-line-num new_line" class="diff-line-num new_line"
/> />
<diff-table-cell <td
v-once
:class="line.type" :class="line.type"
:diff-file="diffFile" class="line_content"
:line="line" v-html="line.richText"
:is-content-line="true" >
/> </td>
</tr> </tr>
</template> </template>
...@@ -113,17 +113,15 @@ export default { ...@@ -113,17 +113,15 @@ export default {
:diff-view-type="parallelDiffViewType" :diff-view-type="parallelDiffViewType"
class="diff-line-num old_line" class="diff-line-num old_line"
/> />
<diff-table-cell <td
v-once
:id="line.left.lineCode" :id="line.left.lineCode"
:diff-file="diffFile" :class="parallelViewLeftLineType"
:line="line"
:is-content-line="true"
:line-position="linePositionLeft"
:line-type="parallelViewLeftLineType"
:diff-view-type="parallelDiffViewType"
class="line_content parallel left-side" class="line_content parallel left-side"
@mousedown.native="handleParallelLineMouseDown" @mousedown.native="handleParallelLineMouseDown"
/> v-html="line.left.richText"
>
</td>
<diff-table-cell <diff-table-cell
:diff-file="diffFile" :diff-file="diffFile"
:line="line" :line="line"
...@@ -135,16 +133,14 @@ export default { ...@@ -135,16 +133,14 @@ export default {
:diff-view-type="parallelDiffViewType" :diff-view-type="parallelDiffViewType"
class="diff-line-num new_line" class="diff-line-num new_line"
/> />
<diff-table-cell <td
v-once
:id="line.right.lineCode" :id="line.right.lineCode"
:diff-file="diffFile" :class="line.right.type"
:line="line"
:is-content-line="true"
:line-position="linePositionRight"
:line-type="line.right.type"
:diff-view-type="parallelDiffViewType"
class="line_content parallel right-side" class="line_content parallel right-side"
@mousedown.native="handleParallelLineMouseDown" @mousedown.native="handleParallelLineMouseDown"
/> v-html="line.right.richText"
>
</td>
</tr> </tr>
</template> </template>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment