Resolve "Performance Issues with ReleasesController and subgroups"
What does this MR do and why?
Improve performance with Group Releases endpoint when using a group with many subgroups.
Group-level permission checks now grant permissions on releases in subgroups and projects so moving the permission check to the group level improves performance substantially
Screenshots or screen recordings
These are with a group that has 100 subgroups, 238 projects with 238 releases
curl -H "Authorization: Bearer <PAT>" http://gdk.test:3000/groups/testgroup/-/releases -o /dev/null -s -w %{time_total}
-
master
- 3.55 seconds -
Group-level ability check - 0.57 seconds
How to set up and validate locally
- Create or find a group with many (over 10) subgroups
- Use curl or another REST client and your personal access token to issue
GET https://gitlab.com/groups/<group id>/-/releases
- Performance should be improved over the current version
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #351703 (closed)
Edited by Allen Cook