Skip to content

feat: cache system fontdb to avoid repeated disk I/O - #140

Merged
baseplate-admin merged 1 commit into
baseplate-admin:masterfrom
cryptomilk:asn-wip
May 15, 2026
Merged

feat: cache system fontdb to avoid repeated disk I/O#140
baseplate-admin merged 1 commit into
baseplate-admin:masterfrom
cryptomilk:asn-wip

Conversation

@cryptomilk

Copy link
Copy Markdown
Contributor

Load system fonts once per process via a static OnceLock and clone the result on subsequent calls instead of re-scanning font directories.

Also gate all font loading behind has_text_nodes so SVGs without elements skip fontdb initialization entirely.

Load system fonts once per process via a static OnceLock and clone
the result on subsequent calls instead of re-scanning font directories.

Also gate all font loading behind has_text_nodes so SVGs without <text>
elements skip fontdb initialization entirely.
@baseplate-admin
baseplate-admin merged commit 33c6644 into baseplate-admin:master May 15, 2026
24 checks passed
@baseplate-admin

Copy link
Copy Markdown
Owner

Thanks for the changes

@baseplate-admin

Copy link
Copy Markdown
Owner

@cryptomilk

Copy link
Copy Markdown
Contributor Author

Awesome, thanks!

JFYI: I'm using resvg for https://github.com/cryptomilk/hass-eink-dashboard

cryptomilk added a commit to cryptomilk/hass-eink-dashboard that referenced this pull request May 16, 2026
This support fontdb caching. It will speed up the render pipeline a bit.

See baseplate-admin/resvg-py#140
@baseplate-admin

Copy link
Copy Markdown
Owner

That looks awesome, Nice project

cryptomilk added a commit to cryptomilk/hass-eink-dashboard that referenced this pull request May 16, 2026
This support fontdb caching. It will speed up the render pipeline a bit.

See baseplate-admin/resvg-py#140
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.

2 participants