ICEpdf
  1. ICEpdf
  2. PDF-50

Performance Improvement for OFont character advance calculation

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      any

      Description

      When profiling for PDF-13, several red flags came up around how we where calculating the character advance metrics for layout in the OFont classes.

      The first big offender was GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts() was being called for every new instance of a ofont/Font object. This system call is pretty expensive.

      The next big offender was in related to a sequence of awt calls to get a glphys x and y advance values. I change the code to cache the metric information and only do the full calculation when we need to.

      Two very simple optimizations that increased the parsing speed significantly for the OS release.

        Activity

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Patrick Corless
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: