mirror of
https://github.com/go-gitea/gitea.git
synced 2025-06-22 14:08:01 +02:00
Performance improvements for pull request list page (#29900)
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 --------- Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
@ -144,6 +144,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)
|
||||
|
||||
|
Reference in New Issue
Block a user