0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-01-24 06:49:35 +01:00
gitea/models/issues
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
..
assignees_test.go
assignees.go
comment_code.go
comment_list.go
comment_test.go
comment.go Issue time estimate, meaningful time tracking (#23113) 2024-12-05 13:07:53 +00:00
content_history_test.go
content_history.go
dependency_test.go
dependency.go
issue_index.go
issue_label_test.go
issue_label.go
issue_list_test.go
issue_list.go
issue_lock.go
issue_project.go
issue_search.go
issue_stats.go
issue_test.go
issue_update.go
issue_user_test.go
issue_user.go
issue_watch_test.go
issue_watch.go Strict pagination check (#32548) 2024-11-25 09:56:50 +08:00
issue_xref_test.go
issue_xref.go
issue.go Issue time estimate, meaningful time tracking (#23113) 2024-12-05 13:07:53 +00:00
label_test.go Fix markup render regression and fix some tests (#32640) 2024-11-26 03:04:55 +08:00
label.go Strict pagination check (#32548) 2024-11-25 09:56:50 +08:00
main_test.go
milestone_list.go
milestone_test.go
milestone.go
pull_list_test.go Use batch database operations instead of one by one to optimze api pulls (#32680) 2024-12-11 05:15:06 +08:00
pull_list.go Use batch database operations instead of one by one to optimze api pulls (#32680) 2024-12-11 05:15:06 +08:00
pull_test.go Use batch database operations instead of one by one to optimze api pulls (#32680) 2024-12-11 05:15:06 +08:00
pull.go
reaction.go Strict pagination check (#32548) 2024-11-25 09:56:50 +08:00
review_list.go Use batch database operations instead of one by one to optimze api pulls (#32680) 2024-12-11 05:15:06 +08:00
review_test.go Use batch database operations instead of one by one to optimze api pulls (#32680) 2024-12-11 05:15:06 +08:00
review.go
stopwatch_test.go
stopwatch.go Strict pagination check (#32548) 2024-11-25 09:56:50 +08:00
tracked_time_test.go
tracked_time.go Strict pagination check (#32548) 2024-11-25 09:56:50 +08:00