diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-09-05 14:51:19 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-09-05 14:51:19 +0000 |
commit | 8813089a6477090e2a9422c20432756c96d527be (patch) | |
tree | 8f2351f7a1434b48f822c09f9e3893f8718c4657 /app/finders | |
parent | 7b40d9bf51985ec22969a92248b03ed10f78c567 (diff) | |
parent | 42062a454a650d81d9fe6dddde7b39b056ec0a88 (diff) | |
download | gitlab-ce-8813089a6477090e2a9422c20432756c96d527be.tar.gz |
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.rb | 4 |
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 |