Skip to content

perf: reduce cross-platform font memory allocations - #7

Open
vrdons wants to merge 2 commits into
sonorahq:masterfrom
vrdons:perf/font-allocations
Open

vrdons wants to merge 2 commits into
sonorahq:masterfrom
vrdons:perf/font-allocations

Conversation

@vrdons

@vrdons vrdons commented Sep 7, 2026

Copy link
Copy Markdown

Avoid eagerly materializing every font face in a family. Select and retain only the best matching face on Linux and macOS, while caching cosmic-text fallback resolutions by font and weight.

Also reuse stack-backed filter chains in the renderer to avoid per-batch Vec allocations. Preserve existing fallback, style, weight, emoji, and custom-font behavior without writing additional font data to disk.

Avoid eagerly materializing every font face in a family. Select and retain only the best matching face on Linux and macOS, while caching cosmic-text fallback resolutions by font and weight.

Also reuse stack-backed filter chains in the renderer to avoid per-batch Vec allocations. Preserve existing fallback, style, weight, emoji, and custom-font behavior without writing additional font data to disk.
@vrdons

vrdons commented Sep 10, 2026

Copy link
Copy Markdown
Author

I will add font cache ttl eviction too...

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