Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop caching the *parsed* Font data on its Dict object (PR 7347 follow-up) #12486

Merged
merged 1 commit into from
Oct 16, 2020

Conversation

Snuffleupagus
Copy link
Collaborator

Given that all fonts are, ever since PR #7347, now cached in the "normal" fontCache there's actually no reason for the special font.translated construction. (Given how Objects in JavaScript are references, rather than raw values, the old code shouldn't have caused any significant memory overhead.)

Instead we can simply store the cacheKey, which is a simple string, on only the Font Dicts where it's needed and thus look-up all fonts using the fontCache instead.

…low-up)

Given that *all* fonts are, ever since PR 7347, now cached in the "normal" `fontCache` there's actually no reason for the special `font.translated` construction. (Given how Objects in JavaScript are references, rather than raw values, the old code shouldn't have caused any significant memory overhead.)

Instead we can simply store the `cacheKey`, which is a simple string, on only the Font `Dict`s where it's needed and thus look-up all fonts using the `fontCache` instead.
@Snuffleupagus
Copy link
Collaborator Author

/botio test

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://54.215.176.217:8877/04408d131823c01/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/98a32d005aac038/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Failed

Full output at http://54.67.70.0:8877/98a32d005aac038/output.txt

Total script time: 25.77 mins

  • Font tests: Passed
  • Unit tests: FAILED
  • Regression tests: FAILED

Image differences available at: http://54.67.70.0:8877/98a32d005aac038/reftest-analyzer.html#web=eq.log

@pdfjsbot
Copy link

From: Bot.io (Windows)


Failed

Full output at http://54.215.176.217:8877/04408d131823c01/output.txt

Total script time: 28.99 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: FAILED

Image differences available at: http://54.215.176.217:8877/04408d131823c01/reftest-analyzer.html#web=eq.log

@timvandermeij timvandermeij merged commit 127bb03 into mozilla:master Oct 16, 2020
@timvandermeij
Copy link
Contributor

Looks good!

@Snuffleupagus Snuffleupagus deleted the font-Dict-cacheKey branch October 16, 2020 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants