Details
-
Type: Improvement
-
Status: Closed
-
Priority: 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.
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.
ICEpdf 3.1.0 has been released, closing issues.