summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAhmad Sherif <me@ahmadsherif.com>2016-08-01 13:14:41 +0200
committerAhmad Sherif <me@ahmadsherif.com>2016-08-03 19:26:10 +0200
commit08c1dd348273df67bf14172e9082308e12f94784 (patch)
tree16bed3278ab263b50efa94b4ebc8831632b57dec
parent6eba7188f1cd1fc0bfcb8b1cf46f40338dc892b5 (diff)
downloadgitlab-ce-fix/speed-up-commit-repo-changes.tar.gz
Use commit deltas when counting files in IrkerWorkerfix/speed-up-commit-repo-changes
-rw-r--r--CHANGELOG2
-rw-r--r--app/workers/irker_worker.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 864b8afaf7d..25911e02ec6 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -57,7 +57,7 @@ v 8.11.0 (unreleased)
- Sensible state specific default sort order for issues and merge requests !5453 (tomb0y)
- Fix RequestProfiler::Middleware error when code is reloaded in development
- Catch what warden might throw when profiling requests to re-throw it
- - Speed up and reduce memory usage of Commit#repo_changes and Repository#expire_avatar_cache
+ - Speed up and reduce memory usage of Commit#repo_changes, Repository#expire_avatar_cache and IrkerWorker
v 8.10.3
- Fix Import/Export issue importing milestones and labels not associated properly. !5426
diff --git a/app/workers/irker_worker.rb b/app/workers/irker_worker.rb
index 07cc7c1cbd7..19f38358eb5 100644
--- a/app/workers/irker_worker.rb
+++ b/app/workers/irker_worker.rb
@@ -141,7 +141,7 @@ class IrkerWorker
end
def files_count(commit)
- diffs = commit.raw_diffs
+ diffs = commit.raw_diffs(deltas_only: true)
files = "#{diffs.real_size} file"
files += 's' if diffs.size > 1