mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Reduce the memory usage of PDF asset file content parsing on the mobile https://github.com/siyuan-note/siyuan/issues/9079
This commit is contained in:
parent
2f2d617929
commit
7906dc97c6
1 changed files with 3 additions and 0 deletions
|
|
@ -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{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue