Commit b83bc417 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'mr-diffs-speed-up' into 'master'

Only load what we need when visiting MR diffs page

See merge request !10251
parents e248ec66 0344e083
......@@ -97,6 +97,9 @@ class Projects::MergeRequestsController < Projects::ApplicationController
def diffs
apply_diff_view_cookie!
respond_to do |format|
format.html { define_discussion_vars }
format.json do
@merge_request_diff =
if params[:diff_id]
@merge_request.merge_request_diffs.viewable.find(params[:diff_id])
......@@ -119,9 +122,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController
@environment = @merge_request.environments_for(current_user).last
respond_to do |format|
format.html { define_discussion_vars }
format.json do
if @start_sha
compared_diff_version
else
......
---
title: Speed up initial rendering of MR diffs page
merge_request:
author:
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