⚡ Improve recent docs loading performance Fix https://github.com/siyuan-note/siyuan/issues/11977
This commit is contained in:
parent
f75e383728
commit
eb0879812f
1 changed files with 6 additions and 1 deletions
|
@ -140,9 +140,14 @@ func getRecentDocs() (ret []*RecentDoc, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
var rootIDs []string
|
||||
for _, doc := range tmp {
|
||||
rootIDs = append(rootIDs, doc.RootID)
|
||||
}
|
||||
bts := treenode.GetBlockTrees(rootIDs)
|
||||
var notExists []string
|
||||
for _, doc := range tmp {
|
||||
if bt := treenode.GetBlockTree(doc.RootID); nil != bt {
|
||||
if bt := bts[doc.RootID]; nil != bt {
|
||||
doc.Title = path.Base(bt.HPath) // Recent docs not updated after renaming https://github.com/siyuan-note/siyuan/issues/7827
|
||||
ret = append(ret, doc)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue