1
1
mirror of https://github.com/go-gitea/gitea synced 2025-01-22 07:34:26 +00:00
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
..
2024-02-24 18:46:49 +00:00
2024-11-20 19:26:12 +00:00
2024-11-20 19:26:12 +00:00
2024-11-20 19:26:12 +00:00
2024-11-20 19:26:12 +00:00
2024-11-20 19:26:12 +00:00
2024-11-02 11:20:22 +00:00
2024-11-20 19:26:12 +00:00
2024-11-20 19:26:12 +00:00
2024-11-20 19:26:12 +00:00
2024-05-03 09:13:48 +00:00
2024-05-03 09:13:48 +00:00
2024-09-10 02:23:07 +00:00
2023-07-12 19:07:29 +02:00
2024-10-29 18:27:03 +02:00
2023-12-13 21:02:00 +00:00
2024-11-20 19:26:12 +00:00

Git Module

This module is merged from https://github.com/go-gitea/git which is a Go module to access Git through shell commands. Now it's a part of gitea's main repository for easier pull request.