gitea/services
Lunny Xiao fbe6d9dc6b
Use batch database operations instead of one by one to optimze api pulls ()
Resolve 

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
..
actions allow the actions user to login via the jwt token () 2024-11-20 15:24:09 +00:00
agit Add reviewers selection to new pull request () 2024-11-09 04:48:31 +00:00
asymkey Fix some pending problems () 2024-03-22 19:17:30 +08:00
attachment Include file extension checks in attachment API () 2024-11-06 21:34:32 +00:00
auth Move team related functions to service layer () 2024-11-27 21:12:26 +00:00
automerge Add new event commit status creation and webhook implementation () 2024-11-07 06:41:49 +00:00
context GitHub like repo home page () 2024-12-06 14:29:04 +00:00
contexttest Check if reverse proxy is correctly configured () 2024-05-10 20:07:01 +08:00
convert Use batch database operations instead of one by one to optimze api pulls () 2024-12-11 05:15:06 +08:00
cron Support repo license () 2024-10-01 15:25:08 -04:00
doctor Move team related functions to service layer () 2024-11-27 21:12:26 +00:00
externalaccount allow synchronizing user status from OAuth2 login providers () 2024-07-16 20:33:16 +02:00
feed Move GetFeeds to service layer () 2024-11-29 17:53:49 +00:00
forms Issue time estimate, meaningful time tracking () 2024-12-05 13:07:53 +00:00
gitdiff Reduce integration test overhead () 2024-11-14 19:28:46 +00:00
indexer Update issue indexer after merging a PR () 2024-05-08 14:45:15 +00:00
issue Issue time estimate, meaningful time tracking () 2024-12-05 13:07:53 +00:00
lfs Fix LFS route mock, realm, middleware names () 2024-11-13 16:58:09 +08:00
mailer Use new mail package instead of an unmintained one () 2024-12-05 06:33:43 +08:00
markup Refactor markup render system () 2024-11-24 16:18:57 +08:00
migrations Support migrating GitHub/GitLab PR draft status () 2024-10-13 22:58:13 +03:00
mirror Refactor push mirror find and add check for updating push mirror () 2024-11-18 05:59:04 +00:00
notify Add new event commit status creation and webhook implementation () 2024-11-07 06:41:49 +00:00
oauth2_provider Introduce OrgList and add LoadTeams, optimaze Load teams for orgs () 2024-11-26 21:55:06 +00:00
org Move team related functions to service layer () 2024-11-27 21:12:26 +00:00
packages Add Arch package registry () 2024-12-04 23:09:07 +00:00
projects Add issue comment when moving issues from one column to another of the project () 2024-08-09 01:29:02 +00:00
pull Support "merge upstream branch" (Sync fork) () 2024-12-06 21:10:35 +00:00
release Trim title before insert/update to database to match the size requirements of database () 2024-11-14 07:19:14 +00:00
repository Support "merge upstream branch" (Sync fork) () 2024-12-06 21:10:35 +00:00
secrets Refactor deletion () 2023-12-25 21:25:29 +01:00
task Fix "force private" logic () 2024-05-20 00:56:45 +00:00
uinotification Penultimate round of `db.DefaultContext` refactor () 2023-10-11 04:24:07 +00:00
user Move team related functions to service layer () 2024-11-27 21:12:26 +00:00
webhook Only provide the commit summary for Discord webhook push events () 2024-11-07 19:56:53 +00:00
webtheme Initial support for colorblindness-friendly themes () 2024-04-24 00:18:41 +08:00
wiki Use global lock instead of NewExclusivePool to allow distributed lock between multiple Gitea instances () 2024-09-06 10:12:41 +00:00