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

Andreas Lehmkühler commented on PDFBOX-3151:
--------------------------------------------

With my last change the test runs in half of the time. The old code reverted 
the sort order of the cid ranges within the CMap so that the needed mappings 
for the latin characters were at the end of the LinkedList. Therefore my patch 
"accidentically" speeds up the execution by moving those mappings to the 
begining.

I've ran some test with an additional cach containing those values but it 
doesn't work.

> getStringWidth is terribly slow (and resulting document is invalid)
> -------------------------------------------------------------------
>
>                 Key: PDFBOX-3151
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3151
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 2.0.0
>         Environment: 2.0.0-RC2
>            Reporter: Philip Helger
>            Assignee: John Hewson
>             Fix For: 2.0.0
>
>         Attachments: HelloWorldType0.java, Profiling screenshot.png
>
>
> I'm maintaining a PDF layout engine that makes heavy use of "getStringWidth". 
> With PDFBox 2.0.0 this got much slower. So please find attached an example 
> which you can use for profiling purposes. I used "OpenSans" TTF as the basis 
> (grab it at https://github.com/google/fonts/tree/master/apache/opensans).
> Beside it being slow, the created PDF cannot be opened (but this may have 
> something to do with PDFBOX-2945 in RC2???)



--
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