Cache the result of buildSymbolGlyphIdEncoding (PR 21726 follow-up) - #21740
Conversation
If a PDF document contains multiple (different) non-embedded /Identity encoded Symbol fonts, or once cleanup has been triggered by the viewer, the "SymbolGlyphIdEncoding" would need to be recomputed more than once. By updating the `getLookupTableFactory` helper to be able to create an Array, and not just an Object, it's easy enough to both lazily initialize *and* cache the "SymbolGlyphIdEncoding" (similar to e.g. the existing glyph-maps).
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #21740 +/- ##
=======================================
Coverage 90.09% 90.10%
=======================================
Files 264 264
Lines 67194 67233 +39
=======================================
+ Hits 60538 60578 +40
+ Misses 6656 6655 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
/botio browsertest |
From: Bot.io (Windows)ReceivedCommand cmd_browsertest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/0ed17f52614bedd/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_browsertest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/80444e1e8c0cd5d/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/80444e1e8c0cd5d/output.txt Total script time: 16.79 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/0ed17f52614bedd/output.txt Total script time: 23.83 mins
|
|
Looks good; thank you for improving this! |
If a PDF document contains multiple (different) non-embedded /Identity encoded Symbol fonts, or once cleanup has been triggered by the viewer, the "SymbolGlyphIdEncoding" would need to be recomputed more than once.
By updating the
getLookupTableFactoryhelper to be able to create an Array, and not just an Object, it's easy enough to both lazily initialize and cache the "SymbolGlyphIdEncoding" (similar to e.g. the existing glyph-maps).