Don't use temporty files by default for all PDF sizes
-----------------------------------------------------

                 Key: PDFBOX-948
                 URL: https://issues.apache.org/jira/browse/PDFBOX-948
             Project: PDFBox
          Issue Type: Wish
    Affects Versions: 1.5.0
            Reporter: Martin Koegler


PDFBOX uses by default temporary files as work space (regardless of the PDF 
size).

org.apache.pdfbox.io.RandomAcessFile is not buffered, so each read/write acess 
is a system call.  There are functions like readlong, which call read 4 times 
to read 4 bytes. Additionally, it adds the usual problems with tempory files.

For normal sized PDFs files, the in-memory implementation RandomAccessBuffer 
should not increase the memory usage too much, while providing faster IO as all 
access operations are only memory copies.
 
Therefore, please consider switching the default to in-memory scratch buffers. 
Users with very large files can still pass a temporary directory.





-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to