Cache all fields from PairPos2 and avoid reading subtable#260
Open
dfrg wants to merge 1 commit into
Open
Conversation
Collaborator
Author
|
@valadaptive this avoids subtable reparsing entirely for pairpos2. Would you mind checking if this improves your profile? |
Contributor
|
Yes! This speeds up shaping Ubuntu Light by ~8% in the benchmark. |
Member
|
Looks good in general. Should we remove the unused impl then? Any way to make this more harmonious across lookup types would be nice. Would it be too heavy to do this kind of caching on every lookups? |
Collaborator
Author
|
Yes to all. This needs a bit of cleanup before merging, the code should be better structured to accommodate it and we should try to do this for all lookups. |
dfrg
added a commit
that referenced
this pull request
Jan 5, 2026
This extracts the primary coverage table (along with any suitable caches) into a field on `SubtableInfo` so that we can check coverage before attempting to parse the subtable. The glyph id, coverage index, coverage metadata and external cache are then passed to the subtable apply function in a new `ApplyState` parameter. This avoids some buffer indexing and reparsing the primary coverage table. This attempts to clean up and unify some of the caching code paths along with laying some groundwork for future optimizations (like #260). HR benchmarks seem to show a reasonable gain on non-Latin shaping as a bonus.
Member
|
Do we still need this? Is it already done? Would the faster read-fonts obviate this? |
Collaborator
Author
|
I think this one might still be useful but we’ll need to rebase and measure. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Attempt at #256