优化清理未引用资源内存占用 https://github.com/siyuan-note/siyuan/issues/5200

This commit is contained in:
Liang Ding
2022-06-16 15:10:14 +08:00
parent 8589a53ee4
commit cef4cc2e3f

View File

@@ -448,9 +448,10 @@ func UnusedAssets() (ret []string) {
}
luteEngine := NewLute()
for _, notebook := range notebooks {
notebookAbsPath := filepath.Join(util.DataDir, notebook.ID)
dests := map[string]bool{}
pages := pagedPaths(notebookAbsPath, 20)
// 分页加载,优化清理未引用资源内存占用 https://github.com/siyuan-note/siyuan/issues/5200
pages := pagedPaths(filepath.Join(util.DataDir, notebook.ID), 20)
for _, paths := range pages {
var trees []*parse.Tree
for _, localPath := range paths {