Skip to content

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

:art: Reduce the memory usage of PDF asset file content parsing on the mobile https://github.com/siyuan-note/siyuan/issues/9079

Daniel7906dc97c63d
diff --git a/kernel/model/asset_content.go b/kernel/model/asset_content.go
index 402e981b4f..709be28442 100644
--- a/kernel/model/asset_content.go
+++ b/kernel/model/asset_content.go
@@ -776,6 +776,9 @@ func (parser *PdfAssetParser) Parse(absPath string) (ret *AssetParseResult) {
cores := runtime.NumCPU()
if 4 < cores {
cores = 4 // Limit memory usage
+ if util.ContainerIOS == util.Container || util.ContainerAndroid == util.Container {
+ cores = 1 // Reduce the memory usage of PDF asset file content parsing on the mobile https://github.com/siyuan-note/siyuan/issues/9079
+ }
}
pool, err := webassembly.Init(webassembly.Config{