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

Slow string to hex conversion in ToUnicodeWriter

    XMLWordPrintableJSON

Details

    Description

      The ToUnicodeWriter.writeTo(OutputStream) method converts a lot of shorts and strings to hexadecimal strings. This is done with String.format and therefore not very efficient.

      The ToUnicodeWriter.toHex(int) and ToUnitcodeWriter.stringToHex(String) methods could be rewritten to generate a char-array and being generally more efficient.

      Attachments

        1. PDFBOX-3418_PerformanceTest.zip
          378 kB
          Michael Doswald
        2. PDFBOX-3418_ToUnicodeWriter_performance_rev1.patch
          9 kB
          Michael Doswald

        Activity

          People

            tilman Tilman Hausherr
            michaeldoswald Michael Doswald
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: