Skip to content

Cache the result of buildSymbolGlyphIdEncoding (PR 21726 follow-up) - #21740

Merged
timvandermeij merged 1 commit into
mozilla:masterfrom
Snuffleupagus:buildSymbolGlyphIdEncoding-cache
Aug 10, 2026
Merged

Cache the result of buildSymbolGlyphIdEncoding (PR 21726 follow-up)#21740
timvandermeij merged 1 commit into
mozilla:masterfrom
Snuffleupagus:buildSymbolGlyphIdEncoding-cache

Conversation

@Snuffleupagus

Copy link
Copy Markdown
Collaborator

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).

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-commenter

codecov-commenter commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.10%. Comparing base (c2bbde1) to head (389ddde).
⚠️ Report is 2 commits behind head on master.

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     
Flag Coverage Δ
browsertest 66.35% <100.00%> (-0.04%) ⬇️
fonttest 9.00% <66.66%> (+<0.01%) ⬆️
integrationtest 69.30% <66.66%> (+0.02%) ⬆️
unittest 58.22% <66.66%> (-0.04%) ⬇️
unittestcli 56.60% <66.66%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Snuffleupagus

Copy link
Copy Markdown
Collaborator Author

/botio browsertest

@moz-tools-bot

Copy link
Copy Markdown
Collaborator

From: Bot.io (Windows)


Received

Command cmd_browsertest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.193.163.58:8877/0ed17f52614bedd/output.txt

@moz-tools-bot

Copy link
Copy Markdown
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_browsertest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/80444e1e8c0cd5d/output.txt

@moz-tools-bot

Copy link
Copy Markdown
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/80444e1e8c0cd5d/output.txt

Total script time: 16.79 mins

  • Regression tests: Passed

@moz-tools-bot

Copy link
Copy Markdown
Collaborator

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/0ed17f52614bedd/output.txt

Total script time: 23.83 mins

  • Regression tests: Passed

@timvandermeij
timvandermeij merged commit 297cf0b into mozilla:master Aug 10, 2026
21 checks passed
@timvandermeij

Copy link
Copy Markdown
Collaborator

Looks good; thank you for improving this!

@Snuffleupagus
Snuffleupagus deleted the buildSymbolGlyphIdEncoding-cache branch August 10, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants