[ 
https://issues.apache.org/jira/browse/PDFBOX-2882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14629480#comment-14629480
 ] 

Timo Boehme commented on PDFBOX-2882:
-------------------------------------

I've committed the new implementations with rev. 1691342.

Please note that currently the paging only uses scratch file and no main memory 
because PDDocument.load etc. only calls standard constructor.
For tests with mixed main-memory+file you still have to change 
o.a.pdfbox.io.ScratchFile constructor replacing '0' with how many bytes to be 
used for in-memory pages (should be at least some million to see an effect).

With the new possibilities in defining how memory is to be used the simple 
boolean useScratchFile in PDDocument.load isn't enough anymore. We should 
replace it with a MemorySetting object. But this may be better discussed in 
PDFBOX-2883.

> Improve performance when using scratch file
> -------------------------------------------
>
>                 Key: PDFBOX-2882
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2882
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: Parsing
>    Affects Versions: 2.0.0
>            Reporter: Timo Boehme
>            Assignee: Timo Boehme
>            Priority: Minor
>         Attachments: ScratchFile.java, ScratchFileBuffer.java
>
>
> The current scratch file implementation uses many direct I/O calls which 
> slows down parsing compared with in-memory scratch buffer considerably.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to