You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/services/convert
Lunny Xiao fbe6d9dc6b
Use batch database operations instead of one by one to optimze api pulls (#32680)
Resolve #31492

The response time for the Pull Requests API has improved significantly,
dropping from over `2000ms` to about `350ms` on my local machine. It's
about `6` times faster.

A key area for further optimization lies in batch-fetching data for
`apiPullRequest.ChangedFiles, apiPullRequest.Additions, and
apiPullRequest.Deletions`.

Tests `TestAPIViewPulls` does exist and new tests added.

- This PR also fixes some bugs in `GetDiff` functions.
- This PR also fixes data inconsistent in test data. For a pull request,
the head branch's reference should be equal to the reference in
`pull/xxx/head`.
2 months ago
..
activity.go For API attachments, use API URL (#25639) 2 years ago
attachment.go Fix attachment download bug (#27486) 1 year ago
convert.go Add priority to protected branch (#32286) 2 months ago
git_commit.go Move context from modules to services (#29440) 12 months ago
git_commit_test.go Adjust object format interface (#28469) 1 year ago
issue.go Fix milestone deadline and date related problems (#32339) 3 months ago
issue_comment.go Issue time estimate, meaningful time tracking (#23113) 2 months ago
issue_test.go
main_test.go make writing main test easier (#27270) 1 year ago
mirror.go Even more `db.DefaultContext` refactor (#27352) 1 year ago
notification.go Performance improvements for pull request list page (#29900) 11 months ago
package.go Clarify permission "HasAccess" behavior (#30585) 10 months ago
pull.go Use batch database operations instead of one by one to optimze api pulls (#32680) 2 months ago
pull_review.go Fix possible NPE in ToPullReviewList (#29759) 11 months ago
pull_review_test.go Fix possible NPE in ToPullReviewList (#29759) 11 months ago
pull_test.go Fix `Permission` in API returned repository struct (#25388) 2 years ago
release.go add Upload URL to release API (#26663) 1 year ago
release_test.go add Upload URL to release API (#26663) 1 year ago
repository.go Support repo license (#24872) 4 months ago
secret.go feat: implement organization secret creation API (#26566) 1 year ago
status.go refactor improve NoBetterThan (#26126) 2 years ago
user.go Make gitea webhooks openproject compatible (#28435) 9 months ago
user_test.go Add context cache as a request level cache (#22294) 2 years ago
utils.go Support migration from AWS CodeCommit (#31981) 5 months ago
utils_test.go Rewrite queue (#24505) 2 years ago
wiki.go Fix an actions schedule bug (#28942) 1 year ago