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

Lazy load standard 14 fonts, only if needed

    XMLWordPrintableJSON

Details

    Description

      I am testing text extraction from PDF and profiling the execution.

      I found that the second biggest time consumer is the static code in Standard14Fonts that loads fonts from the pdf box jar.

      Looking at the code I realized we don't have to load all fonts statically, when the class loads.

      Not all PDFs need all fonts, so, if we lazy loaded them, only when needed, it will save some time and some memory.

      The memory part in particular would be important when running on a tablet or a phone, where the entire memory space of the app is 80M - 160M.

      Attachments

        1. PDFBOX-4875.patch
          11 kB
          Alfred

        Activity

          People

            tilman Tilman Hausherr
            Faltiska Alfred
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1m
                1m
                Remaining:
                Remaining Estimate - 1m
                1m
                Logged:
                Time Spent - Not Specified
                Not Specified