Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2016-08-19 02:27:22 +0300
committerDouwe Maan <douwe@selenight.nl>2016-08-19 03:08:59 +0300
commit6a355d451eaca2fc10f5fcf31de13b05fa795b9b (patch)
treef758173d2911fd6ed34698068b90d59e34de5b8c /app/views/discussions/_diff_with_notes.html.haml
parentac89bb0fad1d5820c4defd51cb6ab0626d1fb6ba (diff)
Improve performance of MR show page
Diffstat (limited to 'app/views/discussions/_diff_with_notes.html.haml')
-rw-r--r--app/views/discussions/_diff_with_notes.html.haml13
1 files changed, 8 insertions, 5 deletions
diff --git a/app/views/discussions/_diff_with_notes.html.haml b/app/views/discussions/_diff_with_notes.html.haml
index 81f538a9de1..b2e55f7647a 100644
--- a/app/views/discussions/_diff_with_notes.html.haml
+++ b/app/views/discussions/_diff_with_notes.html.haml
@@ -7,8 +7,11 @@
.diff-content.code.js-syntax-highlight
%table
- - discussion.truncated_diff_lines.each do |line|
- = render "projects/diffs/line", line: line, diff_file: diff_file, plain: true
-
- - if discussion.for_line?(line)
- = render "discussions/diff_discussion", discussion: discussion, expanded: true
+ - discussions = { discussion.line_code => discussion }
+ = render partial: "projects/diffs/line",
+ collection: discussion.truncated_diff_lines,
+ as: :line,
+ locals: { diff_file: diff_file,
+ discussions: discussions,
+ discussion_expanded: true,
+ plain: true }