From cef4cc2e3f17e60db88ad3f76d86b05976a7d423 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Thu, 16 Jun 2022 15:10:14 +0800 Subject: [PATCH] =?UTF-8?q?:zap:=20=E4=BC=98=E5=8C=96=E6=B8=85=E7=90=86?= =?UTF-8?q?=E6=9C=AA=E5=BC=95=E7=94=A8=E8=B5=84=E6=BA=90=E5=86=85=E5=AD=98?= =?UTF-8?q?=E5=8D=A0=E7=94=A8=20https://github.com/siyuan-note/siyuan/issu?= =?UTF-8?q?es/5200?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/assets.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/model/assets.go b/kernel/model/assets.go index c29bf3085..3f38f8ddf 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 {