mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Limit memory usage of PDF parsing https://github.com/siyuan-note/siyuan/pull/9051
This commit is contained in:
parent
f755daee1e
commit
9612e41cf7
1 changed files with 3 additions and 3 deletions
|
|
@ -861,12 +861,12 @@ func (parser *PdfAssetParser) Parse(absPath string) (ret *AssetParseResult) {
|
|||
}
|
||||
|
||||
// loop through ordered PDF text pages and join content for asset parse DB result
|
||||
content := ""
|
||||
contentBuilder := bytes.Buffer{}
|
||||
for _, pt := range pageText {
|
||||
content += " " + normalizeNonTxtAssetContent(pt)
|
||||
contentBuilder.WriteString(" " + normalizeNonTxtAssetContent(pt))
|
||||
}
|
||||
ret = &AssetParseResult{
|
||||
Content: content,
|
||||
Content: contentBuilder.String(),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue