You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Alfred (Jira)" <ji...@apache.org> on 2020/06/14 10:19:00 UTC

[jira] [Created] (PDFBOX-4883) COSFloat is extremely slow

Alfred created PDFBOX-4883:
------------------------------

             Summary: COSFloat is extremely slow
                 Key: PDFBOX-4883
                 URL: https://issues.apache.org/jira/browse/PDFBOX-4883
             Project: PDFBox
          Issue Type: Bug
          Components: PDModel
    Affects Versions: 2.0.20, 3.0.0 PDFBox
            Reporter: Alfred
         Attachments: After.png, Before.png

I am testing text extraction from PDF and profiling the execution.

I found that biggest time consumer is the COSFloat class.

 

All other improvements I suggested so far are small compared to this.

But this is the also the most complex one.

 

I have attached te profiler output for the same text extraction, with and without the COSFloat changes.

The time to extract the same text was 4 times long with the original COSFlow, because of its use of BigDecimal.

I will try to write extra tests for all cases I see in the original COSFLoat code, if they are not already tested.

Then I will submit for review a new COSFloat version.

 

I think this affects parsing and displaying PDFs too, not just text extraction.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org