[
https://issues.apache.org/jira/browse/PDFBOX-4080?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16354640#comment-16354640
]
Maruan Sahyoun edited comment on PDFBOX-4080 at 2/6/18 10:36 PM:
-----------------------------------------------------------------
Mhmm - I might be mistaken but the ScratchFile seems to be intented when
reading a document not when generating a new one. E.g. {{COSOutputStream}} is
not using the ScratchFile even if you could pass one for output. So it needs
more changes.
{{COSDocument}} allows access to the scratch file or we could use
{{COSDocument.createCOSStream()}} to create a {{COSStream}} which uses the
{{ScratchFile}} {{COSDocument}} uses.
I'm even not sure that it's worth the effort at that point in time - what about
looking if we really get memory issues before starting to optimize. There is a
lot of linking and passing objects 'only' to use the ScratchFile.
was (Author: msahyoun):
Mhmm - I might be mistaken but the ScratchFile seems to be intented when
reading a document not when generating a new one. E.g. {{COSOutputStream}} is
not using the ScratchFile even if you could pass one for output. So it needs
more changes.
> Improve memory consumption of PDAbstractAppearanceHandler
> ---------------------------------------------------------
>
> Key: PDFBOX-4080
> URL: https://issues.apache.org/jira/browse/PDFBOX-4080
> Project: PDFBox
> Issue Type: Improvement
> Components: PDModel
> Affects Versions: 3.0.0 PDFBox
> Reporter: Maruan Sahyoun
> Assignee: Maruan Sahyoun
> Priority: Major
> Labels: Annotations
> Fix For: 3.0.0 PDFBox
>
>
> PDAbstractAppearanceHandler calls new COSStream(), this has a huge memory
> footprint (PDFBOX-3868 and PDFBOX-3852). We'd need to find a way to pass the
> document, or the document scratch file, or there will be trouble for files
> with many annotations, e.g. a long scientific document with many footnotes.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]