Skip to content

Gitaly n+1: Project#readme_url results in at least 3 Gitaly calls per invocation

https://gitlab.com/gitlab-org/gitlab-ce/issues/45827, via https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18960, introduced the readme_url to the Project resource on the GitLab API.

This change results in at least three, sometimes more, Gitaly calls per project returned via the API.

When ?per_page=100 is set, this means that some API calls will generate 300 Gitaly calls just iterating over projects.

This puts strain on the Gitaly servers, but also slows down API responses.

Originally reported here: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18960#note_98714897

cc @ifarkas @DouweM @zj @jacobvosmaer-gitlab @jramsay