Skip to content

Don't create a temp reference for branch comparisons within project

Stan Hu requested to merge sh-avoid-fetching-temp-refs-within-project into master

A temp reference is only needed to fetch a branch from another project, as in the case for forked repositories. For branch comparisons within the same project, we can just use the existing branch names to do the comparison.

Relates to https://gitlab.com/gitlab-org/gitlab-ce/issues/38689#note_126107862

Results

Locally with a few more than 7 discussions it was taking 38 RPC requests (405ms). Now it's taking 19 RPC requests (61ms). Great improvements!

We'll have considerable improvements taking it along with https://gitlab.com/gitlab-org/gitlab-ce/issues/58297.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/58315

Edited by Oswaldo Ferreira

Merge request reports