-
-
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
Improve commits list performance to reduce unnecessary database queries #33528
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
785b83a
to
602be74
Compare
Is there existing test coverage? |
Yes, there are already some tests for commits list UI or API and I added an extra test for it in 646d3cd |
lafriks
approved these changes
Feb 13, 2025
silverwind
approved these changes
Feb 14, 2025
zjjhot
added a commit
to zjjhot/gitea
that referenced
this pull request
Feb 17, 2025
* giteaofficial/main: Add API to support link package to repository and unlink it (go-gitea#33481) [skip ci] Updated translations via Crowdin Update JS and PY dependencies (go-gitea#33587) [chore] add git mailmap for proper attribution of authorship (go-gitea#33612) Move commits signature and verify functions to service layers (go-gitea#33605) add spacing between sign in button's icon and text (go-gitea#33609) enable literal string for code search (go-gitea#33590) [skip ci] Updated translations via Crowdin Artifacts download api for artifact actions v4 (go-gitea#33510) Fix bug when get commit (go-gitea#33602) Fix mirror bug (go-gitea#33597) Fix typo in HTML attribute (go-gitea#33599) Use default Git timeout when checking repo health (go-gitea#33593) Improve commits list performance to reduce unnecessary database queries (go-gitea#33528) Performance optimization for pull request files loading comments attachments (go-gitea#33585) Fix PR's target branch dropdown (go-gitea#33589)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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
size/L
Denotes a PR that changes 100-499 lines, ignoring generated files.
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.
When listing commits, Gitea attempts to retrieve the actual user based on the commit email. Querying users one by one from the database is inefficient. This PR optimizes the process by batch querying users by email, reducing the number of database queries.