Cache state counts for issuables list (no params)
Getting counts query is frequently reported as top 15 in total time taken.
Putting a cache here will help reducing the number of DB queries. The cache would be only used when filters are not present, so we only improve the performance of the initial page load.
Original investigation issue: #325472 (closed)
Proposal
Having rounded numbers over a certain threshold so ideally we can re-use the same caching approach we use in the left panel. We can cache&round the count only if count>1000, so for small projects this number would be still accurate, and we also ignore confidentiality/sub-groups access checks. Showing accurate count would be "on-demand" inside a tooltip
Tasks
-
-
Refactor services that are being used for the sidebar counts so they include all states counts (currently they only include open issuables count).
-
-
-
Add the option to cache the counts (if no filters are present) in OptimizedIssuableLabelFilter#count_by_state
.
-
-
-
Implement a tooltip for each tab that includes the precise count. This should only be present if the count was rounded. See example screenshot.
-
Edited by Eugenia Grieff