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

skip loading a diff when we just need the conflicts from it #5529

Merged
merged 3 commits into from
Jan 21, 2025

Conversation

ajtmccarty
Copy link
Contributor

@ajtmccarty ajtmccarty commented Jan 20, 2025

should help performance when merging a branch b/c it allows us to skip loading the whole diff to check if there are any conflicts. for a small diff, this does not really matter, but for a huge diff, skipping loading the whole diff makes a big difference

@github-actions github-actions bot added the group/backend Issue related to the backend (API Server, Git Agent) label Jan 20, 2025
Copy link

codspeed-hq bot commented Jan 21, 2025

CodSpeed Performance Report

Merging #5529 will not alter performance

Comparing ajtm-01202025-skip-loading-diff-for-conflicts (3f2d75c) with stable (5bf43e2)

Summary

✅ 10 untouched benchmarks

@ajtmccarty ajtmccarty marked this pull request as ready for review January 21, 2025 03:12
@ajtmccarty ajtmccarty requested a review from a team January 21, 2025 03:13
@ogenstad
Copy link
Contributor

What does this mean with regards to providing a diff object for the actual merge? I.e. after a branch has been merged we will want to look at some sort of diff object in order to figure out what events we need to generate.

@ajtmccarty
Copy link
Contributor Author

What does this mean with regards to providing a diff object for the actual merge? I.e. after a branch has been merged we will want to look at some sort of diff object in order to figure out what events we need to generate.

the method where the actual merge logic happens is DiffMerge.merge_graph, which is called after this conflicts check. merge_graph gets the latest version of the diff from the database before running the actual merge queries, so that will continue working as expected

@ajtmccarty ajtmccarty merged commit a213d04 into stable Jan 21, 2025
36 checks passed
@ajtmccarty ajtmccarty deleted the ajtm-01202025-skip-loading-diff-for-conflicts branch January 21, 2025 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
group/backend Issue related to the backend (API Server, Git Agent)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants