mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
fix(files): preload file tree with 2 level deep
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
This commit is contained in:
parent
03b06e022f
commit
c521b7ca34
1 changed files with 2 additions and 1 deletions
|
|
@ -38,7 +38,8 @@ const registerQueue = new PQueue({ concurrency: 5, intervalCap: 5, interval: 200
|
|||
*/
|
||||
async function registerTreeChildren(path: string = '/') {
|
||||
await queue.add(async () => {
|
||||
const nodes = await getFolderTreeNodes(path)
|
||||
// preload up to 2 depth levels for faster navigation
|
||||
const nodes = await getFolderTreeNodes(path, 2)
|
||||
const promises = nodes.map((node) => registerQueue.add(() => registerNodeView(node)))
|
||||
await Promise.allSettled(promises)
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue