Philip Helger created PDFBOX-3200:
-------------------------------------

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


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