Przeglądaj źródła

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

Daniel 1 rok temu
rodzic
commit
2bcf26166d
1 zmienionych plików z 3 dodań i 2 usunięć
  1. 3 2
      kernel/model/import.go

+ 3 - 2
kernel/model/import.go

@@ -549,7 +549,7 @@ func ImportSY(zipPath, boxID, toPath string) (err error) {
 		}
 
 		treenode.IndexBlockTree(tree)
-		sql.UpsertTreeQueue(tree)
+		sql.IndexTreeQueue(tree)
 	}
 
 	IncSync()
@@ -894,7 +894,8 @@ func ImportFromLocalPath(boxID, localPath string, toPath string) (err error) {
 		buildBlockRefInText()
 
 		for i, tree := range importTrees {
-			indexWriteJSONQueue(tree)
+			treenode.IndexBlockTree(tree)
+			sql.IndexTreeQueue(tree)
 			if 0 == i%4 {
 				util.PushEndlessProgress(fmt.Sprintf(Conf.Language(66), fmt.Sprintf("%d/%d ", i, len(importTrees))+tree.HPath))
 			}