mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
⚡ 改进重命名资源文件性能 https://github.com/siyuan-note/siyuan/issues/7322
改进建立引用索引 https://github.com/siyuan-note/siyuan/issues/7320
This commit is contained in:
parent
6743b21193
commit
b6ea32462e
23 changed files with 155 additions and 132 deletions
|
|
@ -38,6 +38,7 @@ import (
|
|||
"github.com/siyuan-note/filelock"
|
||||
"github.com/siyuan-note/logging"
|
||||
"github.com/siyuan-note/siyuan/kernel/conf"
|
||||
"github.com/siyuan-note/siyuan/kernel/filesys"
|
||||
"github.com/siyuan-note/siyuan/kernel/sql"
|
||||
"github.com/siyuan-note/siyuan/kernel/task"
|
||||
"github.com/siyuan-note/siyuan/kernel/treenode"
|
||||
|
|
@ -386,12 +387,13 @@ func (box *Box) renameSubTrees(tree *parse.Tree) {
|
|||
func (box *Box) moveTrees0(files []*FileInfo) {
|
||||
totals := len(files) + 5
|
||||
showProgress := 64 < totals
|
||||
luteEngine := util.NewLute()
|
||||
for i, subFile := range files {
|
||||
if !strings.HasSuffix(subFile.path, ".sy") {
|
||||
continue
|
||||
}
|
||||
|
||||
subTree, err := LoadTree(box.ID, subFile.path) // LoadTree 会重新构造 HPath
|
||||
subTree, err := filesys.LoadTree(box.ID, subFile.path, luteEngine) // LoadTree 会重新构造 HPath
|
||||
if nil != err {
|
||||
continue
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue