mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-30 21:38:48 +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
|
|
@ -434,7 +434,7 @@ func RemoveUnusedAssets() (ret []string) {
|
|||
IncSync()
|
||||
}
|
||||
|
||||
indexHistoryDir(filepath.Base(historyDir), NewLute())
|
||||
indexHistoryDir(filepath.Base(historyDir), util.NewLute())
|
||||
cache.LoadAssets()
|
||||
return
|
||||
}
|
||||
|
|
@ -468,7 +468,7 @@ func RemoveUnusedAsset(p string) (ret string) {
|
|||
ret = absPath
|
||||
IncSync()
|
||||
|
||||
indexHistoryDir(filepath.Base(historyDir), NewLute())
|
||||
indexHistoryDir(filepath.Base(historyDir), util.NewLute())
|
||||
cache.RemoveAsset(p)
|
||||
return
|
||||
}
|
||||
|
|
@ -504,7 +504,7 @@ func RenameAsset(oldPath, newName string) (err error) {
|
|||
return
|
||||
}
|
||||
|
||||
luteEngine := NewLute()
|
||||
luteEngine := util.NewLute()
|
||||
for _, notebook := range notebooks {
|
||||
pages := pagedPaths(filepath.Join(util.DataDir, notebook.ID), 32)
|
||||
|
||||
|
|
@ -562,7 +562,7 @@ func UnusedAssets() (ret []string) {
|
|||
if nil != err {
|
||||
return
|
||||
}
|
||||
luteEngine := NewLute()
|
||||
luteEngine := util.NewLute()
|
||||
for _, notebook := range notebooks {
|
||||
dests := map[string]bool{}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue