[
https://issues.apache.org/jira/browse/PDFBOX-3200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tilman Hausherr updated PDFBOX-3200:
------------------------------------
Labels: Optimization (was: )
> 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
> Assignee: Tilman Hausherr
> Priority: Minor
> Labels: Optimization
> 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]