mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +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
|
|
@ -28,6 +28,7 @@ import (
|
|||
"github.com/88250/gulu"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/siyuan-note/filelock"
|
||||
"github.com/siyuan-note/siyuan/kernel/filesys"
|
||||
"github.com/siyuan-note/siyuan/kernel/model"
|
||||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
)
|
||||
|
|
@ -86,7 +87,8 @@ func heading2Doc(c *gin.Context) {
|
|||
}
|
||||
|
||||
model.WaitForWritingFiles()
|
||||
tree, err := model.LoadTree(targetNotebook, targetPath)
|
||||
luteEngine := util.NewLute()
|
||||
tree, err := filesys.LoadTree(targetNotebook, targetPath, luteEngine)
|
||||
if nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
|
|
@ -130,7 +132,8 @@ func li2Doc(c *gin.Context) {
|
|||
}
|
||||
|
||||
model.WaitForWritingFiles()
|
||||
tree, err := model.LoadTree(targetNotebook, targetPath)
|
||||
luteEngine := util.NewLute()
|
||||
tree, err := filesys.LoadTree(targetNotebook, targetPath, luteEngine)
|
||||
if nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
|
|
@ -424,7 +427,8 @@ func createDailyNote(c *gin.Context) {
|
|||
|
||||
box := model.Conf.Box(notebook)
|
||||
model.WaitForWritingFiles()
|
||||
tree, err := model.LoadTree(box.ID, p)
|
||||
luteEngine := util.NewLute()
|
||||
tree, err := filesys.LoadTree(box.ID, p, luteEngine)
|
||||
if nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue