Marius Thesing created FOP-3206:
-----------------------------------
Summary: [PATCH] Fonts: allow skipping the last modified check
Key: FOP-3206
URL: https://issues.apache.org/jira/browse/FOP-3206
Project: FOP
Issue Type: New Feature
Components: font/unqualified
Affects Versions: 2.9
Reporter: Marius Thesing
Attachments: fontskiplastmodifiedcheck.diff
While profiling PDF generation performance, we noticed that a significant
amount of time is spent checking the last modified date of the font files here:
[https://github.com/apache/xmlgraphics-fop/blob/main/fop-core/src/main/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java#L178]
There is also another reference about this being an issue here:
[https://lists.apache.org/thread/ygc9kxy5y1k2gfcgfo7hn50kq0mzdq9t]
For our use case, this check is completely unnecessary since the fonts are
never going to change anyway in a containerized environment.
Attached is a patch for an opt-in *<skip-last-modified-check />* configuration
in the *<fonts>* section. If enabled, the last modified date will simply not be
used. I also added test cases for the configuration itself and the that the
FontInfoFinder actually does ignore the last modified date, if configured.
Feel free to request any changes. I can also open a GitHub PR for this if you
want.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)