mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
⚡ Improve data sync performance for booting https://github.com/siyuan-note/siyuan/issues/13216
This commit is contained in:
parent
eba4dfa0da
commit
89f1887c3b
16 changed files with 153 additions and 113 deletions
|
|
@ -18,6 +18,7 @@ package util
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"io/fs"
|
||||
"net"
|
||||
"os"
|
||||
"path"
|
||||
|
|
@ -167,7 +168,7 @@ func GetChildDocDepth(treeAbsPath string) (ret int) {
|
|||
|
||||
baseDepth := strings.Count(filepath.ToSlash(treeAbsPath), "/")
|
||||
depth := 1
|
||||
filelock.Walk(dir, func(path string, info os.FileInfo, err error) error {
|
||||
filelock.Walk(dir, func(path string, d fs.DirEntry, err error) error {
|
||||
p := filepath.ToSlash(path)
|
||||
currentDepth := strings.Count(p, "/")
|
||||
if depth < currentDepth {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue