mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-09-15 18:56:59 +00:00
Refactor parseTreeEntries, speed up tree list (#21368)
Close #20315 (fix the panic when parsing invalid input), Speed up #20231 (use ls-tree without size field) Introduce ListEntriesRecursiveFast (ls-tree without size) and ListEntriesRecursiveWithSize (ls-tree with size)
This commit is contained in:
parent
69fc510d6d
commit
c08e42c47e
7 changed files with 109 additions and 53 deletions
|
@ -22,9 +22,9 @@ func TreeList(ctx *context.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
entries, err := tree.ListEntriesRecursive()
|
||||
entries, err := tree.ListEntriesRecursiveFast()
|
||||
if err != nil {
|
||||
ctx.ServerError("ListEntriesRecursive", err)
|
||||
ctx.ServerError("ListEntriesRecursiveFast", err)
|
||||
return
|
||||
}
|
||||
entries.CustomSort(base.NaturalSortLess)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue