Group issues / MRs count in the menu sidebar is slow and can timeout
Summary
Visiting a group with many subgroups/issues/epics (less than 1k as when it's more we cache) may cause a timeout issue when trying to render the Issues/MR count.
Steps to reproduce
- Have a group with many subgroups
- Try to open the group
- Observe error
What is the current bug behavior?
The UI doesn't load due to the query being too expensive
What is the expected correct behavior?
The page loads without issues
Relevant logs and/or screenshots
From BE issue:
- https://log.gprd.gitlab.net/app/r/s/cZ2cJ
- https://console.postgres.ai/gitlab/gitlab-production-main/sessions/32452/commands/100188#visualize-pev2
Output of checks
This bug happens on GitLab.com Enterprise Edition 17.5.0-pre 28210a8a
Possible fixes
Switch how we fetch the count to async GraphQL queries.
Edited by Fernanda Toledo