Skip to content

Cache merge requests count in group pages sidebar

Related to #243753 (closed)

Similar to the implementation for issues, we could save page load time for all pages at a group level, by caching the merge requests count in the sidebar.

The query for this count is performed in GroupsHelper#group_merge_requests_count and called from the sidebar partial.

At the date this issue was created, and for GitLab.org group, this query takes ~50ms.

Screen_Shot_2021-01-22_at_12.49.19

To be determined:

  • Do we also want to cache and round this count only after a certain value?