1
1
mirror of https://github.com/go-gitea/gitea synced 2024-12-22 08:34:26 +00:00
gitea/routers
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
..
api Use batch database operations instead of one by one to optimze api pulls (#32680) 2024-12-11 05:15:06 +08:00
common Fix markup render regression and fix some tests (#32640) 2024-11-26 03:04:55 +08:00
install Save initial signup information for users to aid in spam prevention (#31852) 2024-09-09 17:05:16 -04:00
private Split mail sender sub package from mailer service package (#32618) 2024-11-30 01:15:41 +00:00
utils Refactor external URL detection (#29973) 2024-03-22 04:32:40 +08:00
web Refactor issue filter (labels, poster, assignee) (#32771) 2024-12-10 11:38:22 +08:00
init.go Make oauth2 code clear. Move oauth2 provider code to their own packages/files (#32148) 2024-10-02 08:03:19 +08:00