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/helpers/blob_helper.rb | |
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/helpers/blob_helper.rb')
-rw-r--r-- | app/helpers/blob_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/blob_helper.rb b/app/helpers/blob_helper.rb index abe115d8c68..48c27828219 100644 --- a/app/helpers/blob_helper.rb +++ b/app/helpers/blob_helper.rb @@ -13,7 +13,7 @@ module BlobHelper blob = project.repository.blob_at(ref, path) rescue nil - return unless blob && blob_text_viewable?(blob) + return unless blob from_mr = options[:from_merge_request_id] link_opts = {} |