mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 19:11: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
@@ -78,10 +78,8 @@ each pull request, which tea only makes when --json names them.`, Args: argsExac
|
||||
}
|
||||
items := window.Items
|
||||
if a.jsonSelects("reviewers", "reviewer_teams", "merged_by") {
|
||||
for i, item := range items {
|
||||
if items[i], err = service.View(cmd.Context(), item.Number); err != nil {
|
||||
return err
|
||||
}
|
||||
if items, err = service.ViewAll(cmd.Context(), items); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
noun := map[string]string{"open": "open pull requests", "closed": "closed pull requests", "merged": "merged pull requests", "all": "pull requests"}[state]
|
||||
|
||||
Reference in new issue
Block a user