googlefonts / googlefonts/fontations

[gvar] we could allocate less when building tuple variations

Open
#635 0 comments 0 reactions 0 assignees View on GitHub
optimization
Dominant language
Rust
Stars
826
Forks
75
Avg merge
22h 33m
Merged PRs (30d)
75

Description

Choosing the correct packed points format for a given tuple requires us to fully build that tuple twice, after which we throw away these results; we then build the tuple a third time, at the end. In theory we could have some shared set of buffers that we reuse for all of this work, which would be slightly more complicated.

In practice this is very low priority, but something to look at as directed by profiling.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by profiling the gvar tuple-variation building path described in the issue, measuring the repeated tuple construction and discarded results. Trace where the packed points format is selected and where the tuple is built a third time. Done means shared buffers reduce allocation or construction work while preserving the generated font data and existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
40/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.