Conversation
Contributor
I'm so sorry Colin lgtm, some lint errors need fixing on the Python side |
wmedrano
approved these changes
Apr 8, 2026
This makes it easier to diagnose where exactly ttx_diff itself is
spending time. Output looks like this:
TIMINGS
0.658s build fontc
35.915s build fontmake
17.134s ttx fontc
17.053s ttx fontmake
0.443s normalize fontc gpos
0.314s normalize fontmake gpos
0.004s normalize fontc gdef
0.003s normalize fontmake gdef
1.142s fill_in_gvar_deltas
53.099s reduce_diff_noise
1.665s sort indices
13.976s name id to name
1.596s gdef work
14.911s name id to name
1.024s gdef work
3.007s normalize glyf contours
3.556s normalize gvar contours
7.455s allow off-by-ones
5.949s extract_comparables fontc
4.342s extract_comparables fontmake
0.332s check_sizes
2m29.088s total
Member
Author
No apologies necessary! I wouldn't have expected the off-by-ones to be such a slow operation, neat to be able to see that clearly. |
Contributor
Worth citing #1932 which observes "Most of the time seems to be in ttx_diff in allow_some_off_by_ones" |
Contributor
|
(I'm pretty sure I wrote allow_some_off_by_ones off the cuff with a focus on v.simple outlines so it's not surprising there are fonts that it handles poorly) |
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.
speculative, we mentioned this a while ago and I got nerd-sniped.
for the example included below, we're spending lots of time in name_id_to_name. In rubik, we're spending lots of time normalizing off-by-ones.
This makes it easier to diagnose where exactly ttx_diff itself is spending time. Output looks like this: