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`.
2024-12-11 05:15:06 +08:00
..
activity.go
attachment.go
convert.go Add priority to protected branch (#32286) 2024-11-27 05:41:06 +01:00
git_commit.go
git_commit_test.go
issue.go Fix milestone deadline and date related problems (#32339) 2024-11-05 07:46:40 +00:00
issue_comment.go Issue time estimate, meaningful time tracking (#23113) 2024-12-05 13:07:53 +00:00
issue_test.go
main_test.go
mirror.go
notification.go
package.go Clarify permission "HasAccess" behavior (#30585) 2024-04-20 03:15:04 +00:00
pull.go Use batch database operations instead of one by one to optimze api pulls (#32680) 2024-12-11 05:15:06 +08:00
pull_review.go
pull_review_test.go
pull_test.go
release.go
release_test.go
repository.go Support repo license (#24872) 2024-10-01 15:25:08 -04:00
secret.go
status.go
user.go Make gitea webhooks openproject compatible (#28435) 2024-05-26 04:08:13 +00:00
user_test.go
utils.go Support migration from AWS CodeCommit (#31981) 2024-09-11 07:49:42 +08:00
utils_test.go
wiki.go