Skip to content

cobalt: Enable CobaltMmapFontCache by default - #13165

Merged
sherryzy merged 1 commit into
youtube:mainfrom
sherryzy:mmap
Oct 9, 2026
Merged

sherryzy merged 1 commit into
youtube:mainfrom
sherryzy:mmap

Conversation

@sherryzy

@sherryzy sherryzy commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

cobalt: Rework CobaltMmapFontCache (disabled by default)

  • Decompress each WOFF2 font once and share the bytes for scanning,
    rendering and the cache file.
  • Write and clean up cache files in the background, never on the font
    thread.
  • Check the flag at the call sites; with it off, fonts load as before.

On RDK with the feature on, later launches use 23-24 MB less peak memory
and 28-34 MB less PMF.

Bug: 544754138

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

🤖 Gemini Suggested Commit Message


cobalt: Enable CobaltMmapFontCache by default

Enable the memory-mapped font cache feature by default. This change
allows the font cache to utilize memory mapping for font resources,
which improves memory efficiency and performance by leveraging
system-level paging rather than manual buffer allocation.

Bug: None

💡 Pro Tips for a Better Commit Message:

  1. Influence the Result: Want to change the output? You can write custom prompts or instructions directly in the Pull Request description. The model uses that text to generate the message.
  2. Re-run the Generator: Post a comment with: /generate-commit-message
@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor
Context State Description
CI / All Pass ⏳ PENDING Checks are running
CI / android ⏳ PENDING Checks are running
CI / evergreen ⏳ PENDING Checks are running
CI / linux ⏳ PENDING Checks are running
CI / tvos ⏳ PENDING Checks are running
@sherryzy sherryzy changed the title Enable CobaltMmapFontCache by default for 3p Oct 6, 2026
@sherryzy
sherryzy requested a review from andrewsavage1 October 6, 2026 22:57
@sherryzy
sherryzy marked this pull request as ready for review October 6, 2026 23:01

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request enables the kCobaltMmapFontCache feature by default in SkWoff2FontCache_cobalt.cc. I have no feedback to provide as the change is straightforward and correct.

@oxve oxve closed this Oct 6, 2026
@oxve oxve reopened this Oct 6, 2026
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

🤖 Gemini Suggested Commit Message


cobalt: Enable CobaltMmapFontCache by default

Enable the memory-mapped font cache feature by default. This change
allows the font cache to utilize memory mapping for font resources,
improving memory efficiency and performance by leveraging system-level
paging rather than manual buffer allocation.

Bug: 544754138

💡 Pro Tips for a Better Commit Message:

  1. Influence the Result: Want to change the output? You can write custom prompts or instructions directly in the Pull Request description. The model uses that text to generate the message.
  2. Re-run the Generator: Post a comment with: /generate-commit-message
@andrewsavage1 andrewsavage1 added the cp-27.lts Cherry Pick to the 27.lts branch label Oct 7, 2026
@sherryzy
sherryzy enabled auto-merge (squash) October 7, 2026 17:18
@sherryzy
sherryzy disabled auto-merge October 8, 2026 22:48
@sherryzy

sherryzy commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

@andrewsavage1 FYI, I updated the code to check the flag at the three call sites rather than inside the helpers to make it clearer the feature is gated by feature flag entirely.

@sherryzy
sherryzy enabled auto-merge (squash) October 9, 2026 18:24
@sherryzy
sherryzy merged commit 297aa52 into youtube:main Oct 9, 2026
522 of 525 checks passed
@andrewsavage1 andrewsavage1 removed the cp-27.lts Cherry Pick to the 27.lts branch label Oct 9, 2026
briantting pushed a commit that referenced this pull request Oct 13, 2026
Refer to original PR: #13165

cobalt: Rework CobaltMmapFontCache (disabled by default)

- Decompress each WOFF2 font once and share the bytes for scanning,
  rendering and the cache file.
- Write and clean up cache files in the background, never on the font
  thread.
- Check the flag at the call sites; with it off, fonts load as before.

On RDK with the feature on, later launches use 23-24 MB less peak memory
and 28-34 MB less PMF.

Bug: 544754138

(cherry picked from commit 297aa52)
briantting pushed a commit that referenced this pull request Oct 16, 2026
Refer to original PR: #13165

cobalt: Rework CobaltMmapFontCache (disabled by default)

- Decompress each WOFF2 font once and share the bytes for scanning,
  rendering and the cache file.
- Write and clean up cache files in the background, never on the font
  thread.
- Check the flag at the call sites; with it off, fonts load as before.

On RDK with the feature on, later launches use 23-24 MB less peak memory
and 28-34 MB less PMF.

Bug: 544754138

(cherry picked from commit 297aa52)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants