🎨 Improve data indexing performance when importing .sy.zip and markdown https://github.com/siyuan-note/siyuan/issues/10986

This commit is contained in:
Daniel 2024-04-11 21:54:34 +08:00
parent 2bcf26166d
commit f5ceb847f4
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
15 changed files with 45 additions and 33 deletions

View file

@ -97,7 +97,7 @@ func ListItem2Doc(srcListItemID, 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
}
@ -105,7 +105,7 @@ func ListItem2Doc(srcListItemID, 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()