Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ufo2fontir] Avoid duplicate loading of kerning groups #636

Merged
merged 1 commit into from
Dec 7, 2023

Conversation

cmyr
Copy link
Member

@cmyr cmyr commented Dec 7, 2023

we were calling the (very expensive) kerning_groups_for function twice, whene we can trivially reuse the results of the first call.

this looks to make a measurable difference before/after (in a profile this fn accounted for .6% of the total compile time)

Benchmark 1: target/release/fontc ../fontfiles/googlesans/source/GoogleSans/GoogleSans.designspace
  Time (mean ± σ):      4.327 s ±  0.060 s    [User: 6.830 s, System: 3.038 s]
  Range (min … max):    4.252 s …  4.443 s    10 runs


Benchmark 1: target/release/fontc ../fontfiles/googlesans/source/GoogleSans/GoogleSans.designspace
  Time (mean ± σ):      4.282 s ±  0.044 s    [User: 6.835 s, System: 3.034 s]
  Range (min … max):    4.218 s …  4.349 s    10 runs

(JMM)

we were calling the (very expensive) kerning_groups_for function twice,
whene we can trivially reuse the results of the first call.
@cmyr cmyr force-pushed the kerning-groups-one-time branch from b9556ce to c14de3f Compare December 7, 2023 01:14
@rsheeter rsheeter added this pull request to the merge queue Dec 7, 2023
Merged via the queue into main with commit 8203b71 Dec 7, 2023
10 checks passed
@rsheeter rsheeter deleted the kerning-groups-one-time branch December 7, 2023 01:33
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