-
- Downloads
Re-use issue/MR counts for the pagination system
This changes the issue and MR index pages so the pagination system re-uses the output of the COUNT(*) query used to calculate the number of rows per state (opened, closed, etc). This removes the need for an additional COUNT(*) on both pages.
Showing
- app/controllers/concerns/issuable_collections.rb 28 additions, 0 deletionsapp/controllers/concerns/issuable_collections.rb
- app/controllers/projects/issues_controller.rb 2 additions, 3 deletionsapp/controllers/projects/issues_controller.rb
- app/controllers/projects/merge_requests_controller.rb 2 additions, 3 deletionsapp/controllers/projects/merge_requests_controller.rb
- app/finders/issuable_finder.rb 4 additions, 0 deletionsapp/finders/issuable_finder.rb
- app/helpers/issuables_helper.rb 2 additions, 1 deletionapp/helpers/issuables_helper.rb
- app/views/projects/issues/_issues.html.haml 1 addition, 1 deletionapp/views/projects/issues/_issues.html.haml
- app/views/projects/merge_requests/_merge_requests.html.haml 1 addition, 1 deletionapp/views/projects/merge_requests/_merge_requests.html.haml
- changelogs/unreleased/mr-index-page-performance.yml 5 additions, 0 deletionschangelogs/unreleased/mr-index-page-performance.yml
- lib/gitlab/issuables_count_for_state.rb 50 additions, 0 deletionslib/gitlab/issuables_count_for_state.rb
- spec/controllers/concerns/issuable_collections_spec.rb 82 additions, 0 deletionsspec/controllers/concerns/issuable_collections_spec.rb
- spec/finders/issues_finder_spec.rb 16 additions, 2 deletionsspec/finders/issues_finder_spec.rb
- spec/finders/merge_requests_finder_spec.rb 14 additions, 0 deletionsspec/finders/merge_requests_finder_spec.rb
- spec/lib/gitlab/issuables_count_for_state_spec.rb 37 additions, 0 deletionsspec/lib/gitlab/issuables_count_for_state_spec.rb
lib/gitlab/issuables_count_for_state.rb
0 → 100644
Please register or sign in to comment