From 3d7feeede32a81df06f80f6f3599bfe62aa6e13d Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Thu, 17 Mar 2016 17:52:19 +0100 Subject: [PATCH] Don't rebuild diverging commit count caches When calling Repository#build_cache we _don't_ want to build the diverging commit count cache as doing so can be _very_ slow for repositories with lots of branches. Because these caches are built whenever needed (= when actually viewing the list of branches in the web UI) we can safely remove this code from Repository#build_cache. --- app/models/repository.rb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index 53d3d90859f..25d24493f6e 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -227,12 +227,6 @@ class Repository send(key) end end - - branches.each do |branch| - unless cache.exist?(:"diverging_commit_counts_#{branch.name}") - send(:diverging_commit_counts, branch) - end - end end def expire_tags_cache