Some performance optimization on dashboard and issues page (#29010)

This PR do some loading speed optimization for feeds user interface
pages.
- Load action users batchly but not one by one.
- Load action repositories batchly but not one by one.
- Load action's Repo Owners batchly but not one by one.
- Load action's possible issues batchly but not one by one.
- Load action's possible comments batchly but not one by one.

(cherry picked from commit aed3b53abdd02a3ffbf9e8eb90272ff567333073)
This commit is contained in:
Lunny Xiao 2024-03-12 12:57:19 +08:00 committed by Earl Warren
parent 3acb68e5e4
commit d996c5d517
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
7 changed files with 234 additions and 81 deletions

View file

@ -543,9 +543,13 @@ func InitiateDownload(ctx *context.Context) {
// SearchRepo repositories via options
func SearchRepo(ctx *context.Context) {
page := ctx.FormInt("page")
if page <= 0 {
page = 1
}
opts := &repo_model.SearchRepoOptions{
ListOptions: db.ListOptions{
Page: ctx.FormInt("page"),
Page: page,
PageSize: convert.ToCorrectPageSize(ctx.FormInt("limit")),
},
Actor: ctx.Doer,