Optimize group labels page
What does this MR do?
Reduce the overhead to calculate number of open/closed issues and merge requests within the group or project. It's also removes a call to
Projects::LabelsController#find_labels that performs an unnecessary extra call.
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
Some users are experiencing slowness when viewing group labels page. Also on this page the number of open issues and merge request per label are incorrect.
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
- CHANGELOG entry added
API support added
- Added for this feature/bug
- All builds are passing
- Conform by the merge request performance guides
- Conform by the style guides
Branch has no merge conflicts with
master(if it does - rebase it please)
- Squashed related commits together