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

ASF subversion and git services commented on PDFBOX-3200:
---------------------------------------------------------

Commit 1725732 from [~tilman] in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1725732 ]

PDFBOX-3200: performance improvement, as suggested by Philip Helger

> Performance improvement in PDPageContentStream.setFont
> ------------------------------------------------------
>
>                 Key: PDFBOX-3200
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3200
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: PDModel
>    Affects Versions: 2.0.0
>         Environment: RC3
>            Reporter: Philip Helger
>            Priority: Minor
>             Fix For: 2.0.0
>
>
> Small performance improvement. Instead of
> {code}
>         if (font.willBeSubset() && 
> !document.getFontsToSubset().contains(font))
>         {
>             document.getFontsToSubset().add(font);
>         }
> {code}
> I suggest to replace it with
> {code}
>         if (font.willBeSubset())
>         {
>             document.getFontsToSubset().add(font);
>         }
> {code}
> since the effort for "Set.add" and "Set.contains" are very similar



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