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

Investigate performance regression #369

Closed
cmyr opened this issue Jul 12, 2023 · 4 comments · Fixed by #380
Closed

Investigate performance regression #369

cmyr opened this issue Jul 12, 2023 · 4 comments · Fixed by #380

Comments

@cmyr
Copy link
Member

cmyr commented Jul 12, 2023

          > is almost 4 times slower than when I also revert https://github.com/googlefonts/fontc/pull/359

maybe this warrants its own issue. Something is going on with #359 that has slowed down things noticeably. Building GoogleSans.designspace takes 27 seconds after #359, and only 5 seconds if I revert it (timings are with fontc built in release mode and with --emit-ir=false, debug or emit-ir=true make it even slower). I am not able to figure out what in #359 would produce such a major (5x) slow-down.

Originally posted by @anthrotype in #365 (comment)

@rsheeter
Copy link
Contributor

rsheeter commented Jul 12, 2023 via email

@rsheeter
Copy link
Contributor

rsheeter commented Aug 8, 2023

https://github.com/bheisler/iai might be worth a look; if it works we could have CI for perf for a small set of exemplar fonts.

@cmyr
Copy link
Member Author

cmyr commented Aug 8, 2023

agree that this looks promising. I wonder if someone else has done the work to integrate that into github actions...

@rsheeter
Copy link
Contributor

rsheeter commented Aug 8, 2023

After #380 if I flamegraph Oswald (cmd below) the dominant factors are Font::load (16%) and and iup_delta_optimize (22%). It also looks like perhaps we would benefit from some buffer preallocation in glyph ir, will file a separate issue for that.

As none of this is new due to #359 I'd be inclined to call this fixed if the results hold up for Google Sans.

rm -rf build/ && cargo flamegraph -p fontc --root --  --source ../OswaldFont/sources/Oswald.glyphs --emit-ir false

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 a pull request may close this issue.

2 participants