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

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

I can't confirm such huge differences when running the code. 

Using 2.0.31-SNAPSHOT I got 2400ms (file) vs. 3300ms (stream). Following 
Maruans suggestion to wrap the FileInputStream in a BufferedInputStream speeds 
up the test and it now takes 2900ms. 

Saying that, IMHO there isn't see any real regression here. 

> Loading font streams has poorer performance compared to loading font files
> --------------------------------------------------------------------------
>
>                 Key: PDFBOX-5779
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5779
>             Project: PDFBox
>          Issue Type: Improvement
>    Affects Versions: 3.0.1 PDFBox
>            Reporter: bai yuan
>            Priority: Major
>         Attachments: arial.ttf, pdfbox-1.java, pdfbox.java
>
>
> Run the attached program, then open the code on line 41 and comment out the 
> code on line 44, and compare the time consumption of the two font loading 
> methods.
> Why does using font streams have poorer performance compared to using font 
> files? Is this a limitation? If I can only use font streams, are there any 
> ways to improve performance?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to