Swap out call to CommitsByMessage to ListCommits
gitaly#4749 (closed) details slow performance of searching commits by message if the repository is very large and has a deep history of commits. Instead of using the CommitsByMessage
RPC, we can use the more efficient ListCommits
RPC which has an option for searching commits after
a certain date.
Create an option after
in the call that gets passed to list_commits
that can be called through the UI/API.
As an immediate workaround to improve commit query performance for large repositories:
- RPC will be swapped by a hardcoded
after
option value when a feature flag is enabled. - The hardcoded value will be set to 3 months.
- The feature flag will be enabled in self-managed GitLab instances as a workaround to improve performance until user specified time values are supported.
Edited by Marie-Christine Babin