mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Improve data indexing performance when importing .sy.zip and markdown https://github.com/siyuan-note/siyuan/issues/10986
This commit is contained in:
parent
2bcf26166d
commit
f5ceb847f4
15 changed files with 45 additions and 33 deletions
|
|
@ -256,7 +256,7 @@ func Doc2Heading(srcID, targetID string, after bool) (srcTreeBox, srcTreePath st
|
|||
targetTree.Root.SetIALAttr("updated", util.CurrentTimeSecondsStr())
|
||||
treenode.RemoveBlockTreesByRootID(srcTree.ID)
|
||||
treenode.RemoveBlockTreesByRootID(targetTree.ID)
|
||||
err = indexWriteJSONQueue(targetTree)
|
||||
err = indexWriteTreeUpsertQueue(targetTree)
|
||||
IncSync()
|
||||
RefreshBacklink(srcTree.ID)
|
||||
RefreshBacklink(targetTree.ID)
|
||||
|
|
@ -355,7 +355,7 @@ func Heading2Doc(srcHeadingID, targetBoxID, targetPath string) (srcRootBlockID,
|
|||
srcTree.Root.AppendChild(treenode.NewParagraph())
|
||||
}
|
||||
treenode.RemoveBlockTreesByRootID(srcTree.ID)
|
||||
if err = indexWriteJSONQueue(srcTree); nil != err {
|
||||
if err = indexWriteTreeUpsertQueue(srcTree); nil != err {
|
||||
return "", "", err
|
||||
}
|
||||
|
||||
|
|
@ -363,7 +363,7 @@ func Heading2Doc(srcHeadingID, targetBoxID, targetPath string) (srcRootBlockID,
|
|||
newTree.Root.SetIALAttr("updated", util.CurrentTimeSecondsStr())
|
||||
newTree.Root.Spec = "1"
|
||||
box.addMinSort(path.Dir(newTargetPath), newTree.ID)
|
||||
if err = indexWriteJSONQueue(newTree); nil != err {
|
||||
if err = indexWriteTreeUpsertQueue(newTree); nil != err {
|
||||
return "", "", err
|
||||
}
|
||||
IncSync()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue