mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 11:01:25 +01:00
perf: drop wasted requests and reuse markdown renderers
pr edit with reviewers and other fields reads the pull request once, org delete counts only repositories, org view counts concurrently, team list skips the repository count of all-repository teams, pr diff --web builds the URL locally, pr list re-reads pull requests concurrently for review fields, and glamour renderers are built once per width and color. Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
8 files changed
+104
-47
No files matched your search
@@ -203,7 +203,8 @@ func (s Teams) Sizes(ctx context.Context, teams []Team) ([]TeamSize, error) {
|
||||
_, resp, err := c.Organizations.ListTeamMembers(ctx, id, gitea.ListTeamMembersOptions{ListOptions: first})
|
||||
return resp, err
|
||||
})
|
||||
if err != nil {
|
||||
if err != nil || teams[i].AllRepositories {
|
||||
sizes[i] = TeamSize{Members: members}
|
||||
return err
|
||||
}
|
||||
repositories, err := listTotal(ctx, s.Client, func(ctx context.Context, c *gitea.Client) (*gitea.Response, error) {
|
||||
|
||||
Reference in new issue
Block a user