[
https://issues.apache.org/jira/browse/PDFBOX-5550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17653304#comment-17653304
]
Andreas Lehmkühler commented on PDFBOX-5550:
--------------------------------------------
To bound the copies per thread wasn't the best idea. It has to be held per
file. Any access within the same thread reuses the existing
RandomAccessReadBufferedFile. Other threads are using a copy of the origin
RandomAccessReadBufferedFile. Those copies (childs) are held in a concurrent
map at the origin (parent) RandomAccessReadBufferedFile. All childs are closed
if the parent is closed
> reduce number of open files
> ---------------------------
>
> Key: PDFBOX-5550
> URL: https://issues.apache.org/jira/browse/PDFBOX-5550
> Project: PDFBox
> Issue Type: Improvement
> Components: IO
> Affects Versions: 3.0.0 PDFBox
> Reporter: Andreas Lehmkühler
> Assignee: Andreas Lehmkühler
> Priority: Major
> Fix For: 3.0.0 PDFBox
>
>
> {{org.apache.pdfbox.io.RandomAccessReadBufferedFile}} creates a new instance
> of {{{{{}org.apache.pdfbox.io.RandomAccessReadBufferedFile{}}}}} which opens
> a new file using the underlying file every time when creating a new view. The
> view of a COSStream isn't most likely closed until the entire pdf is closed.
> In the end there are as many open files as created COSStreams until the pdf
> is closed.
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]