Groups list API namespace_settings N+1
Problem
I noticed a N+1 problem in Groups list API endpoint. We request namespace_settings
for each group in the list.
URL to verify: https://gitlab.com/api/v4/groups
Current GitLab.com performance
https://gitlab.com/api/v4/groups
433 ms / 142 requests
Performance dashboard: https://10k.testbed.gitlab.net/-/grafana/d/J0ysCtCWz/gpt-test-results?orgId=1&var-test_name=api_v4_groups&from=now-7d&to=now
Solution
- Preload
namespace_settings
when we fetch the list of groups. - Update the N+1 test to detect this problem
Edited by Vasilii Iakliushin