Gitaly page-token pagination to protected_tags and protected_branches
Problem
Currently, the protected branches and tags show pages load all matching refs at once without pagination, which could cause performance issues for repositories with large numbers of refs. The number of Gitaly calls increases linearly with the number of protected branches/tags, leading to slow page loads.
Performance Impact
- Without pagination: Gitaly calls scale linearly with the number of protected refs (e.g., 832 calls for 832 tags).
- With pagination: Consistent performance with 20 calls + 1 per page regardless of total ref count.
Proposed Solution
Add pagination support to the protected branches and tags show pages to limit the number of matching refs displayed per page and improve performance.
Expected Benefits
- Consistent page load performance regardless of repository size
- Reduced Gitaly calls from linear scaling to a fixed 20 + 1 per page
- Better user experience for large repositories
- Improved scalability for protected ref management
Edited by 🤖 GitLab Bot 🤖