You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/models/organization
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`.
2 months ago
..
main_test.go make writing main test easier (#27270) 1 year ago
org.go Reimplement GetUserOrgsList to make it simple and clear (#32486) 3 months ago
org_list.go Introduce OrgList and add LoadTeams, optimaze Load teams for orgs (#32543) 2 months ago
org_list_test.go Introduce OrgList and add LoadTeams, optimaze Load teams for orgs (#32543) 2 months ago
org_repo.go Use RepositoryList instead of []*Repository (#25074) 2 years ago
org_test.go Reimplement GetUserOrgsList to make it simple and clear (#32486) 3 months ago
org_user.go Add option to filter board cards by labels and assignees (#31999) 5 months ago
org_user_test.go Calculate `PublicOnly` for org membership only once (#32234) 3 months ago
team.go Enable more `revive` linter rules (#30608) 9 months ago
team_invite.go Implement FSFE REUSE for golang files (#21840) 2 years ago
team_invite_test.go Replace 'userxx' with 'orgxx' in all test files when the user type is org (#27052) 1 year ago
team_list.go Use batch database operations instead of one by one to optimze api pulls (#32680) 2 months ago
team_list_test.go Use batch database operations instead of one by one to optimze api pulls (#32680) 2 months ago
team_repo.go Fix get reviewers' bug (#32415) 2 months ago
team_repo_test.go Fix get reviewers' bug (#32415) 2 months ago
team_test.go Move team related functions to service layer (#32537) 2 months ago
team_unit.go Even more `db.DefaultContext` refactor (#27352) 1 year ago
team_user.go Add user blocking (#29028) 11 months ago