-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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 slow patch checking with commits that add or remove many files #31548
Merged
techknowlogick
merged 3 commits into
go-gitea:main
from
brechtvl:fix-slow-check-many-files
Jul 4, 2024
Merged
Fix slow patch checking with commits that add or remove many files #31548
techknowlogick
merged 3 commits into
go-gitea:main
from
brechtvl:fix-slow-check-many-files
Jul 4, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Running git update-index for every individual file is slow, so add and remove everything with a single git command. When such a commit lands in the default branch, it could cause PR creation and patch checking for all open PRs to be slow, or time out entirely. For example, a commit that removes 1383 files was measured to take more than 60 seconds and timed out. With this change checking takes about a second. Related to go-gitea#27967, though this will not help with commits that change many lines in few files.
silverwind
reviewed
Jul 3, 2024
silverwind
approved these changes
Jul 3, 2024
lunny
reviewed
Jul 4, 2024
Side notes: This is a good example of avoiding too many file paths in the git command, using stdin. |
lunny
approved these changes
Jul 4, 2024
GiteaBot
pushed a commit
to GiteaBot/gitea
that referenced
this pull request
Jul 4, 2024
…o-gitea#31548) Running git update-index for every individual file is slow, so add and remove everything with a single git command. When such a big commit lands in the default branch, it could cause PR creation and patch checking for all open PRs to be slow, or time out entirely. For example, a commit that removes 1383 files was measured to take more than 60 seconds and timed out. With this change checking took about a second. This is related to go-gitea#27967, though this will not help with commits that change many lines in few files.
zjjhot
added a commit
to zjjhot/gitea
that referenced
this pull request
Jul 5, 2024
* giteaofficial/main: Fix slow patch checking with commits that add or remove many files (go-gitea#31548) Add typescript guideline and typescript-specific eslint plugins and fix issues (go-gitea#31521)
silverwind
pushed a commit
that referenced
this pull request
Jul 5, 2024
…31548) (#31560) Backport #31548 by @brechtvl Running git update-index for every individual file is slow, so add and remove everything with a single git command. When such a big commit lands in the default branch, it could cause PR creation and patch checking for all open PRs to be slow, or time out entirely. For example, a commit that removes 1383 files was measured to take more than 60 seconds and timed out. With this change checking took about a second. This is related to #27967, though this will not help with commits that change many lines in few files. Co-authored-by: Brecht Van Lommel <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
backport/done
All backports for this PR have been created
backport/v1.22
This PR should be backported to Gitea 1.22
lgtm/done
This PR has enough approvals to get merged. There are no important open reservations anymore.
modifies/go
Pull requests that update Go code
performance/speed
performance issues with slow downs
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Running git update-index for every individual file is slow, so add and remove everything with a single git command.
When such a big commit lands in the default branch, it could cause PR creation and patch checking for all open PRs to be slow, or time out entirely. For example, a commit that removes 1383 files was measured to take more than 60 seconds and timed out. With this change checking took about a second.
This is related to #27967, though this will not help with commits that change many lines in few files.