[
https://issues.apache.org/jira/browse/PDFBOX-3432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15388157#comment-15388157
]
Tilman Hausherr commented on PDFBOX-3432:
-----------------------------------------
Your patches are always welcome.
I committed everything except the int-int map, and split it in two commits.
Could you please check whether removing Collections.max really makes a
difference, or is this something that you already know from your daily work
experience?
Re int-int map, I think that it would be preferable to use something that
already exists and has been used for years. Can you do the benchmark tests with
one of these? I wouldn't take the one from Apache commons dormant. This doesn't
sound good:
https://commons.apache.org/releases/moving-to-dormant.html
Re other fonts - no, we have only that one.
> Optimize CID to GlyphId mapping (TTF)
> -------------------------------------
>
> Key: PDFBOX-3432
> URL: https://issues.apache.org/jira/browse/PDFBOX-3432
> Project: PDFBox
> Issue Type: Improvement
> Components: FontBox
> Affects Versions: 2.0.2
> Environment: Ubuntu 14.04.4 LTS
> Reporter: Michael Doswald
> Priority: Trivial
> Labels: optimization, performance
> Attachments: PDFBOX-3432_Optimize_CID_to_GlyphId_mapping_rev1.patch,
> pdfbox-performance-PDFBOX-3432.zip
>
>
> TTF fonts map code-points (Code IDs) to glyphs. These are mappings from int
> to int. Because the JDK lacks map classes for primitive types, the code (e.g.
> in CmapSubtable) currently uses Map<Integer,Integer> for those mappings. This
> is inefficient in different ways:
> * Autoboxing/unboxing introduces a performance penalty
> * Boxing to Integer objects has a memory overhead
> * The JDK Map implementation has a big memory overhead for such simple objects
> For efficiency (execution time and memory consumption) I would propose to
> introduce a simple IntIntMap implementation which works with primitive
> integers.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]