Skip to content

builder: share source Files with recipe provider - #1238

Merged
cmyr merged 1 commit into
mainfrom
parse-sources-once
Oct 16, 2026
Merged

cmyr merged 1 commit into
mainfrom
parse-sources-once

Conversation

@cmyr

@cmyr cmyr commented Oct 16, 2026

Copy link
Copy Markdown
Member

The recipe provider kept its own module-level cache of File objects, separate from GFBuilder.named_files. For a static Glyphs source both sides read File.instances (the provider to plan the recipe, InstantiateUFO to find its instance), so the source was loaded with glyphsLib and converted to UFO masters twice.

The provider now takes its sources from named_files. On HachiMaruPop this halves the CPU time of the recipe and graph phase (18.9s to 8.9s user) and lowers peak RSS from 1.7 GB to 1.1 GB.

The recipe provider kept its own module-level cache of File objects,
separate from GFBuilder.named_files. For a static Glyphs source both
sides read File.instances (the provider to plan the recipe,
InstantiateUFO to find its instance), so the source was loaded with
glyphsLib and converted to UFO masters twice.

The provider now takes its sources from named_files. On HachiMaruPop
this halves the CPU time of the recipe and graph phase (18.9s to 8.9s
user) and lowers peak RSS from 1.7 GB to 1.1 GB.
@cmyr
cmyr merged commit 78a7dcf into main Oct 16, 2026
17 checks passed
@cmyr
cmyr deleted the parse-sources-once branch October 16, 2026 15:11
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