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

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

I checked the cardinality issue again and found that it is not even needed. 
With r1691783 I've made the following changes:
* remove free page counter variable
* remove {{volatile}} from {{file}} and {{raf}} since both are accessed only 
under synchronization on same object

{quote}
Why can't we read from a "closed" page?
{quote}
In order to prevent getting different results depending on the setting of 
allowed main-memory to use for pages. If we allow reading pages from a closed 
page handler an application might function as expected reading an in-memory 
page from a wrongly closed page handler. With a different memory setting this 
would fail because accessing the page from file is not possible. Thus the user 
would assume that there is something wrong with the underlying memory 
management but not within its application. I want to prevent this by having the 
logical identical behaviour independent of the memory setting. This is in my 
eyes a strong reason, especially in a complex application it is quite valuable 
to get the correct reason for an error.

> 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