perf(text): cache CPU glyph rasterization results - #517
Open
kivutar wants to merge 2 commits into
Open
Conversation
kivutar
force-pushed
the
perf/cache-cpu-text
branch
from
August 17, 2026 16:03
78e1193 to
9697ac5
Compare
Contributor
Author
|
CI is currently failing during action setup because GitHub's codeload endpoints return 429/5xx errors; no failing job reached this branch's code. I retriggered the workflow once by refreshing the head commit, but the same infrastructure outage affected more runners and fork authors cannot rerun upstream workflows. Local validation is green as documented in the PR description. |
Contributor
Author
|
Can we re-run the CI on this please? |
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.
Summary
FontSourceCorrectness and lifecycle
The final-mask key includes the glyph ID, exact size and subpixel coordinates, hinting mode, and raster mode. Each
FontSourceowns its cache, so different fonts and weights cannot contaminate one another.FontSource.Closesynchronizes with lazy cache initialization before clearing it. Errors and successful masks are deterministic and cached together.Hinted outlines are immutable after construction. A per-entry
sync.Oncecoalesces concurrent work, while the sharded LRU bounds retained glyphs.Benchmarks
Upstream
main:This branch:
Validation
go test ./text -count=1go test -race ./text -count=1go vet ./...staticcheck ./text/...