Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-3200

Performance improvement in PDPageContentStream.setFont

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • PDModel
    • RC3

    Description

      Small performance improvement. Instead of

              if (font.willBeSubset() && !document.getFontsToSubset().contains(font))
              {
                  document.getFontsToSubset().add(font);
              }
      

      I suggest to replace it with

              if (font.willBeSubset())
              {
                  document.getFontsToSubset().add(font);
              }
      

      since the effort for "Set.add" and "Set.contains" are very similar

      Attachments

        Activity

          People

            tilman Tilman Hausherr
            phax Philip Helger
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: