-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Reduce calls to git cat-file -s #14682
Merged
Merged
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
There are multiple places where there are repeated calls to git cat-file -s due to the blobs not being created with their size. Through judicious use of git ls-tree -l and slight adjustments to the indexer code we can avoid a lot of these calls. Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath
added
performance/speed
performance issues with slow downs
performance/bigrepo
Performance Issues affecting Big Repositories
labels
Feb 14, 2021
6543
reviewed
Feb 14, 2021
GiteaBot
added
the
lgtm/need 2
This PR needs two approvals by maintainers to be considered for merging.
label
Feb 14, 2021
Coupled with #14685 this will reduce the number of git calls in language settings from 2 per file + 2 (git ls-tree & get commit) -> 2 (git ls-tree and a single semi long running batch.) |
6543
approved these changes
Feb 15, 2021
GiteaBot
added
lgtm/need 1
This PR needs approval from one additional maintainer to be merged.
and removed
lgtm/need 2
This PR needs two approvals by maintainers to be considered for merging.
labels
Feb 15, 2021
Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath
commented
Feb 15, 2021
zeripath
commented
Feb 16, 2021
lunny
approved these changes
Feb 17, 2021
GiteaBot
added
lgtm/done
This PR has enough approvals to get merged. There are no important open reservations anymore.
and removed
lgtm/need 1
This PR needs approval from one additional maintainer to be merged.
labels
Feb 17, 2021
🚀 |
Ok I'll take a look at the bleve and elastic indexers next - those could do with a single batch cat-file too |
zeripath
added a commit
to zeripath/gitea
that referenced
this pull request
Mar 27, 2021
git gc cron could change the size of the repository therefore we should update the size of the repo stored in our database. Also significantly improve the efficiency of counting lfs associated with the repository Fix go-gitea#14682 Signed-off-by: Andrew Thornton <art27@cantab.net>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
lgtm/done
This PR has enough approvals to get merged. There are no important open reservations anymore.
performance/bigrepo
Performance Issues affecting Big Repositories
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.
There are multiple places where there are repeated calls to
git cat-file -s
due to the blobs not being created with their size.Through judicious use of
git ls-tree -l
and slight adjustments to the indexer code we can avoid a lot of these calls.Signed-off-by: Andrew Thornton art27@cantab.net