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:
authorSean McGivern <sean@mcgivern.me.uk>2017-09-05 17:51:19 +0300
committerSean McGivern <sean@mcgivern.me.uk>2017-09-05 17:51:19 +0300
commit8813089a6477090e2a9422c20432756c96d527be (patch)
tree8f2351f7a1434b48f822c09f9e3893f8718c4657 /app/finders
parent7b40d9bf51985ec22969a92248b03ed10f78c567 (diff)
parent42062a454a650d81d9fe6dddde7b39b056ec0a88 (diff)
Merge branch 'mr-index-page-performance' into 'master'
Re-use issue/MR counts for the pagination system Closes #27168 See merge request !13805
Diffstat (limited to 'app/finders')
-rw-r--r--app/finders/issuable_finder.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb
index c8dd2275730..9848497f258 100644
--- a/app/finders/issuable_finder.rb
+++ b/app/finders/issuable_finder.rb
@@ -61,6 +61,10 @@ class IssuableFinder
execute.find_by(*params)
end
+ def row_count
+ Gitlab::IssuablesCountForState.new(self).for_state_or_opened(params[:state])
+ end
+
# We often get counts for each state by running a query per state, and
# counting those results. This is typically slower than running one query
# (even if that query is slower than any of the individual state queries) and