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:
authorStan Hu <stanhu@gmail.com>2016-07-30 07:04:04 +0300
committerStan Hu <stanhu@gmail.com>2016-07-30 07:06:50 +0300
commit48ff40a047103bf09d4ac53fdbc984d73bc464cb (patch)
treea5cf5da6f8be493878d9e0f667888f04446b817a /app/views/projects/diffs
parent6ad514d0663bad80e24586be0919a580cdaab8d2 (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.haml9
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)