mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-18 17:00:02 +02:00
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:
parent
3acb68e5e4
commit
d996c5d517
7 changed files with 234 additions and 81 deletions
|
@ -53,3 +53,12 @@ func Sorted[S ~[]E, E cmp.Ordered](values S) S {
|
|||
slices.Sort(values)
|
||||
return values
|
||||
}
|
||||
|
||||
// TODO: Replace with "maps.Values" once available
|
||||
func ValuesOfMap[K comparable, V any](m map[K]V) []V {
|
||||
values := make([]V, 0, len(m))
|
||||
for _, v := range m {
|
||||
values = append(values, v)
|
||||
}
|
||||
return values
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue