Skip to content

Reduce impact of brotli compression size noise on init font merging.#225

Merged
garretrieger merged 4 commits into
w3c:mainfrom
garretrieger:inert
May 25, 2026
Merged

Reduce impact of brotli compression size noise on init font merging.#225
garretrieger merged 4 commits into
w3c:mainfrom
garretrieger:inert

Conversation

@garretrieger
Copy link
Copy Markdown
Contributor

I've noticed a cases of good merges to the init font being passed up due to noise in brotli compressed sizes (the size delta for the same glyphs will vary signficantly against different base glyphs, particularily seeing larger increases somewhat randomly). This adds a cache of the lowest seen size increase and uses that instead of the value computed per iteration. In general the rough expectation is that size increase for a set of glyphs roughly decreases as the the base size increases due to more opportunities for data sharing.

Also fixes missing inert segment calculation when in dep graph only mode.

In dep graph only mode inert segments weren't being computed since that was previously done only in SegmentationContext::ReprocessSegment() which isn't used in the dep graph only pathway.
…ticular set of glyphs.

I've noticed a cases of good merges to the init font being passed up due to noise in brotli compressed sizes (eg. the size delta for the same glyphs will vary signficantly against different base glyphs, particularily seeing larger increases somewhat randomly). This adds a cache of the lowest seen size increase and uses that instead of the value computed per iteration. In general the rough expectation is that size increase for a set of glyphs roughly decreases as the the base size increases due to more opportunities for data sharing.
When not running in DEP_GRAPH_ONLY, it's possible for a patch to become empty due to exclusive gids.
@garretrieger garretrieger merged commit a7d52f8 into w3c:main May 25, 2026
3 checks passed
@garretrieger garretrieger deleted the inert branch May 25, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant