Performance Issues with ReleasesController and subgroups
### Summary
When querying releases (for example, the release filter in the group issue search) if a group has a large number of subgroups performance can be out of our expectations.
### Steps to reproduce
Query the releases endpoint on any group with a large number of subgroups (i.e. GET /groups/<group_id>/-/releases)
### Relevant logs and/or screenshots
<!-- Paste any relevant logs - please use code blocks (```) to format console output, logs, and code
as it's tough to read otherwise. -->
issue