Improve font validator performance

Version 16.0.3062, macOS 26.4.1, M1 Max 10C.

Reproduction

  1. Download BabelStone Han Extra from Releases · babelstone/babelstonehan-ufo · GitHub
  2. Run Font Validator, tick only “Duplicate contours” and “Fix detected problems”
  3. Click “Validate”
  4. Save the font project as example.fcp
  5. Open example.fcp
  6. Edit any one glyph, copy and paste the contours such that it has duplicate contours
  7. Run Font Validator with the setting above

Expected
Font Validator should run in less than seconds because only one glyph is modified

Actual
Font Validator run for 5 minutes and above for only one glyph change.

Is it possible for FC to cache the last validation status and only run for glyphs that has modified since the last time font validator has run? Of course the FC version and the exact test task can be the cache key. This will drastically reduce the incremental validation time.

I also noticed that when the font validation runs, my CPU does not see very much multi-core usage, the Activity Monitor shows that the usage is around 120% so I assume the validation is done in a single core. Is it possible to parallelize the validation job for sufficiently large font project? I guess even without implementing cache, the full font validation job can take significant less amount of time than the current implementation.

Fixed with the latest release.

Thank you. I can confirm that the second round validation is now much faster. The first round validation still uses only one core so there is no significant performance improvement for the cold start, but for the time being I can live with that.