Skip to content

backend feature compile can be a long pole #456

@rsheeter

Description

@rsheeter

#443 reveals features can be the long pole. There are two non-exclusive options to improve this:

  1. Make it faster
    • We write fea for content (and soon marks) for fea-rs to parse; we could build some other form, e.g. the AST, directly
  2. Make it parallel
    • The more cores you have the more fea-rs pops out as long pole (ref Add a visualization of thread activity #443)
    • Could we break up the compile, for example process GSUB and GPOS separately?
      • Requires splitting up things like feature foo { pos a b -5; sub x by y; } (courtesy of @cmyr)
      • Some parts, e.g. classes, are common

We should start by profiling. flamegraphs of the overall build are fairly noisy, perhaps we can rig fea-rs to be run on just the debug feature file?

$ rm -rf build/ && cargo run -p fontc --  --source ../OswaldFont/sources/Oswald.glyphs --emit-debug
# produces build/debug/features.fea which is the complete combined feature file

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions