Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add GitUtils.findBranchesNoMergeInfo and use it when merge info … #3436

Merged
merged 2 commits into from
Nov 30, 2023

Conversation

ziggystar
Copy link
Contributor

Creates a new method JGitUtil.getBranchesNoMergeInfo that does not perform the expensive repo walks. Then use this method in API requests to list branches.

This is a partial fix for #3434 which improves performance for the API requests. Rendering of the branches page of the repo is still slow.

Maybe renaming the existing method getBranches to getBranchesWithMergeInfo instead would be a better approach, since the new method should be used whenever possible.

@ziggystar ziggystar force-pushed the fix-slow-branch-api branch 2 times, most recently from 253f1cd to 92d878a Compare November 28, 2023 08:45
@takezoe takezoe added this to the 4.41.0 milestone Nov 28, 2023
@ziggystar
Copy link
Contributor Author

I've added a test case that compares the output to the existing findBranches.

There's also a second commit, where I added some override annotations and a return type. I needed the overrides in my IDE for compilation. Don't know whether you want that commit, too.

Copy link
Member

@takezoe takezoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Looks very good to me!!

@takezoe takezoe merged commit dabddf6 into gitbucket:master Nov 30, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants