Commit 803584be authored by Fatih Acet's avatar Fatih Acet Committed by Julius Kvedaras

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
parent a3e0f329
......@@ -145,6 +145,7 @@ export default {
@click.stop="handleToggle"
/>
<a
v-once
ref="titleWrapper"
:href="titleLink"
class="append-right-4"
......
......@@ -189,6 +189,7 @@ export default {
</button>
<a
v-if="lineNumber"
v-once
:data-linenumber="lineNumber"
:href="lineHref"
>
......
......@@ -117,14 +117,6 @@ export default {
<template>
<td
v-if="isContentLine"
:class="lineType"
class="line_content"
v-html="normalizedLine.richText"
>
</td>
<td
v-else
:class="classNameMap"
>
<diff-line-gutter-content
......
......@@ -94,11 +94,12 @@ export default {
:is-hover="isHover"
class="diff-line-num new_line"
/>
<diff-table-cell
<td
v-once
:class="line.type"
:diff-file="diffFile"
:line="line"
:is-content-line="true"
/>
class="line_content"
v-html="line.richText"
>
</td>
</tr>
</template>
......@@ -113,17 +113,15 @@ export default {
:diff-view-type="parallelDiffViewType"
class="diff-line-num old_line"
/>
<diff-table-cell
<td
v-once
:id="line.left.lineCode"
:diff-file="diffFile"
:line="line"
:is-content-line="true"
:line-position="linePositionLeft"
:line-type="parallelViewLeftLineType"
:diff-view-type="parallelDiffViewType"
:class="parallelViewLeftLineType"
class="line_content parallel left-side"
@mousedown.native="handleParallelLineMouseDown"
/>
v-html="line.left.richText"
>
</td>
<diff-table-cell
:diff-file="diffFile"
:line="line"
......@@ -135,16 +133,14 @@ export default {
:diff-view-type="parallelDiffViewType"
class="diff-line-num new_line"
/>
<diff-table-cell
<td
v-once
:id="line.right.lineCode"
:diff-file="diffFile"
:line="line"
:is-content-line="true"
:line-position="linePositionRight"
:line-type="line.right.type"
:diff-view-type="parallelDiffViewType"
:class="line.right.type"
class="line_content parallel right-side"
@mousedown.native="handleParallelLineMouseDown"
/>
v-html="line.right.richText"
>
</td>
</tr>
</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