Performance improvements for pull request list page (#29900) (#29972)

This PR will avoid load pullrequest.Issue twice in pull request list
page. It will reduce x times database queries for those WIP pull
requests.

Partially fix #29585
Backport #29900
This commit is contained in:
Lunny Xiao authored and GitHub committed 2024-03-22 09:58:04 +08:00
1 parent c03b1e2854
commit 6ef986d474
14 files changed
+85 -49

No files matched your search

+6
View File
@@ -128,6 +128,12 @@ func getNotifications(ctx *context.Context) {
ctx.ServerError("LoadIssues", err)
return
}
if err = notifications.LoadIssuePullRequests(ctx); err != nil {
ctx.ServerError("LoadIssuePullRequests", err)
return
}
notifications = notifications.Without(failures)
failCount += len(failures)