diff options
author | Stan Hu <stanhu@gmail.com> | 2016-07-30 07:04:04 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2016-07-30 07:06:50 +0300 |
commit | 48ff40a047103bf09d4ac53fdbc984d73bc464cb (patch) | |
tree | a5cf5da6f8be493878d9e0f667888f04446b817a /app/views/projects/diffs | |
parent | 6ad514d0663bad80e24586be0919a580cdaab8d2 (diff) |
Improve diff performance by eliminating redundant checks for text blobs
On a merge request with over 1000 changed files, there were redundant
calls to blob_text_viewable?, which incurred about 7% of the time.
Improves #14775
Diffstat (limited to 'app/views/projects/diffs')
-rw-r--r-- | app/views/projects/diffs/_file.html.haml | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/app/views/projects/diffs/_file.html.haml b/app/views/projects/diffs/_file.html.haml index c306909fb1a..1854c64cbd7 100644 --- a/app/views/projects/diffs/_file.html.haml +++ b/app/views/projects/diffs/_file.html.haml @@ -9,10 +9,11 @@ = icon('comment') \ - - if editable_diff?(diff_file) - = edit_blob_link(@merge_request.source_project, - @merge_request.source_branch, diff_file.new_path, - from_merge_request_id: @merge_request.id) + - if editable_diff?(diff_file) + = edit_blob_link(@merge_request.source_project, + @merge_request.source_branch, diff_file.new_path, + from_merge_request_id: @merge_request.id, + skip_visible_check: true) = view_file_btn(diff_commit.id, diff_file, project) |