The button to create a pull request fetch GET /api/git/{repo_id}/branches with pagination to retrieve all repository branches. The API returns an array of object which contains the branch name and the associated commit. For each commit we have a lot of information: hash, title, message, author, url and cross references. The problem is cross references, in a big project there is a lot of xref and it causes the sql query to take a lot of time.
But in fact, the create pull request button needs only the branch name. And it is the same for the branch selector of the repository, it needs only the branch name the commit hash.
Note: The tag selector of the repository has the same problem