googlefonts / googlefonts/fontc

glyph order is surprisingly slow and blocks everything

Open
#458 0 comments 0 reactions 0 assignees View on GitHub
performance
Dominant language
Rust
Stars
193
Forks
21
Avg merge
1d 20h
Merged PRs (30d)
60

Description

#443 shows that the glyph order task blocks the entire system because:

1. It can't run until FE work is complete
1. It blocks all BE work

Reproduction:

```shell
$ rm -rf build/ perf.data && cargo flamegraph -p fontc -- --source ../OswaldFont/sources/Oswald.glyphs --emit-ir false --emit-timing

# ../FlameGraph assumed to be a clone of https://github.com/brendangregg/FlameGraph
$ perf script | ../FlameGraph/stackcollapse-perf.pl | grep GlyphOrderWork | ../FlameGraph/flamegraph.pl > glyphorder-flames.svg
```

`build/threads.svg` shows the glyph order blockade:

![image](https://github.com/googlefonts/fontc/assets/6466432/90410e37-1277-4b9a-a476-ba0f45c88444)

The focused flamegraph gives some sense of where the time goes:

![image](https://github.com/googlefonts/fontc/assets/6466432/30f3771c-1606-414d-8b23-20c80b61c132)

It's not the biggest blocker, just notable for stalling all the things.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.