You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Ben Manes (Jira)" <ji...@apache.org> on 2019/12/31 00:26:00 UTC
[jira] [Created] (PDFBOX-4726) PDFRenderer uses excessive memory
Ben Manes created PDFBOX-4726:
---------------------------------
Summary: PDFRenderer uses excessive memory
Key: PDFBOX-4726
URL: https://issues.apache.org/jira/browse/PDFBOX-4726
Project: PDFBox
Issue Type: Improvement
Reporter: Ben Manes
Attachments: heap.png, stacktrace.png
{{PDFRenderer.renderImage}} uses BufferedImage with only in-memory data. This is uncompressed and can use excessive memory. This occurs despite setting \{{MemoryUsageSetting}} being configured on the document for disk space, which should be honored.
This [stackoverflow answer|https://stackoverflow.com/a/53205617/19450]Â suggests using a {{WritableRaster}} backed by a temporary file. This change cannot be done in user code and requires updating the {{PDFRenderer}}.
I am currently trying to track down a PDF that caused out-of-memory issues. From the heap dump only a few {{BufferedImages}} where in memory, but they took 6gb in their uncompressed data.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org