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

Directly interfere to start kern sooner #562

Merged
merged 1 commit into from
Nov 10, 2023
Merged

Directly interfere to start kern sooner #562

merged 1 commit into from
Nov 10, 2023

Conversation

rsheeter
Copy link
Contributor

@rsheeter rsheeter commented Nov 10, 2023

Simplified version of #466. Impact is most readily visible in the timing output:

Before:

image

kern may start as far right as the edge of the blue (be glyph) jobs.

After:

image

kern will consistently start at the left edge (earlier) of the blue jobs. Trying to detect a measurable performance boost with hyperfine was inconclusive, which is better flips run to run. Amusingly Oswald is now too fast for hyperfine to get useful #s at all on Mac. I tried the following:

# LINUX
$ cargo build --release && hyperfine --warmup 10 --runs 50 --prepare 'rm -rf build/' 'target/release/fontc --source ../OswaldFont/sources/Oswald.glyphs --emit-ir false'
# ~140ms

$ cargo build --release && hyperfine --warmup 3 --prepare 'rm -rf build/' 'target/release/fontc --source ../googlesans/source/GoogleSans/GoogleSans.designspace --emit-ir false'
# ~5.7s

# M1 Mac
$ cargo build --release && hyperfine --warmup 10 --runs 50 --prepare 'rm -rf build/' 'target/release/fontc --source ../OswaldFont/sources/Oswald.glyphs --emit-ir false'
#  Too fast to measure reliably

$ cargo build --release && hyperfine --warmup 3 --prepare 'rm -rf build/' 'target/release/fontc --source ../googlesans/source/GoogleSans/GoogleSans.designspace --emit-ir false'
# ~3.7s, apparently if you work on GS you should buy a mac

@rsheeter rsheeter marked this pull request as ready for review November 10, 2023 17:44
Copy link
Member

@cmyr cmyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice.

@rsheeter rsheeter added this pull request to the merge queue Nov 10, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Nov 10, 2023
@rsheeter rsheeter added this pull request to the merge queue Nov 10, 2023
Merged via the queue into main with commit 0a00caa Nov 10, 2023
9 checks passed
@rsheeter rsheeter deleted the fast_kern branch November 10, 2023 19:46
@@ -232,11 +232,15 @@ impl<'a> Workload<'a> {
.queued()
.run();

let launchable: Vec<_> = self
let mut has_kern = false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to single out kerning in this context feels to me a bit out of place/too specific, ideally it'd be preferable to have a more generic way to prioritise tasks that does not involve special-casing

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.

3 participants