0
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-12-23 09:44:33 +01:00
gitea/routers/api/v1/repo
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
..
action.go
avatar.go
blob.go
branch.go Fix delete branch perm checking (#32654) 2024-12-04 11:59:48 +08:00
collaborators.go Fix get reviewers' bug (#32415) 2024-11-22 10:44:48 -05:00
commits.go
compare.go
download.go Add github compatible tarball download API endpoints (#32572) 2024-11-25 19:35:49 +00:00
file.go Add github compatible tarball download API endpoints (#32572) 2024-11-25 19:35:49 +00:00
fork.go Refactor find forks and fix possible bugs that weak permissions check (#32528) 2024-11-18 03:06:25 +00:00
git_hook.go
git_ref.go
hook_test.go
hook.go
issue_attachment.go Include file extension checks in attachment API (#32151) 2024-11-06 21:34:32 +00:00
issue_comment_attachment.go Include file extension checks in attachment API (#32151) 2024-11-06 21:34:32 +00:00
issue_comment.go
issue_dependency.go
issue_label.go Fix internal server error when updating labels without write permission (#32776) 2024-12-10 18:42:52 +00:00
issue_pin.go
issue_reaction.go
issue_stopwatch.go
issue_subscription.go
issue_tracked_time.go
issue.go Fix milestone deadline and date related problems (#32339) 2024-11-05 07:46:40 +00:00
key.go
label.go
language.go
license.go
main_test.go
migrate.go
milestone.go Fix milestone deadline and date related problems (#32339) 2024-11-05 07:46:40 +00:00
mirror.go
notes.go
patch.go
pull_review.go Add reviewers selection to new pull request (#32403) 2024-11-09 04:48:31 +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
release_attachment.go Include file extension checks in attachment API (#32151) 2024-11-06 21:34:32 +00:00
release_tags.go
release.go
repo_test.go
repo.go Move GetFeeds to service layer (#32526) 2024-11-29 17:53:49 +00:00
star.go
status.go
subscriber.go
tag.go
teams.go Move team related functions to service layer (#32537) 2024-11-27 21:12:26 +00:00
topic.go
transfer.go
tree.go
wiki.go