mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-11 11:18:50 +01:00
⚡ Improve block indexing performance https://github.com/siyuan-note/siyuan/issues/10624
This commit is contained in:
parent
04b61dc7eb
commit
6feabe74c8
5 changed files with 13 additions and 19 deletions
|
|
@ -170,7 +170,7 @@ func index(boxID string) {
|
|||
|
||||
cache.PutDocIAL(file.path, docIAL)
|
||||
treenode.IndexBlockTree(tree)
|
||||
sql.IndexTreeQueue(box.ID, file.path)
|
||||
sql.IndexTreeQueue(tree)
|
||||
util.IncBootProgress(bootProgressPart, fmt.Sprintf(Conf.Language(92), util.ShortPathForBootingDisplay(tree.Path)))
|
||||
if 1 < i && 0 == i%64 {
|
||||
util.PushStatusBar(fmt.Sprintf(Conf.Language(88), i, (len(files))-i))
|
||||
|
|
|
|||
|
|
@ -470,7 +470,7 @@ func reindexTree0(tree *parse.Tree, i, size int) {
|
|||
indexWriteJSONQueue(tree)
|
||||
} else {
|
||||
treenode.IndexBlockTree(tree)
|
||||
sql.IndexTreeQueue(tree.Box, tree.Path)
|
||||
sql.IndexTreeQueue(tree)
|
||||
}
|
||||
|
||||
if 0 == i%64 {
|
||||
|
|
|
|||
|
|
@ -307,7 +307,7 @@ func removeIndexes(removeFilePaths []string) (removeRootIDs []string) {
|
|||
util.PushStatusBar(msg)
|
||||
|
||||
treenode.RemoveBlockTreesByRootID(block.RootID)
|
||||
sql.RemoveTreeQueue(block.BoxID, block.RootID)
|
||||
sql.RemoveTreeQueue(block.RootID)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue