Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

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

Liang Dingcef4cc2e3f17
diff --git a/kernel/model/assets.go b/kernel/model/assets.go
index c29bf30858..3f38f8ddf5 100644
--- a/kernel/model/assets.go
+++ b/kernel/model/assets.go
@@ -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 {