Skia/blink currently calls the font fallback code at least once per text block. This is certainly better than once per character, but still too much to be doing IPC on every call.
We should add logic to the font fallback implementation to keep track of which font families were recently retrieved - if they can match the desired character we don't need to do the IPC at all.
There's a few possible ways to organize the cache:
A single list of fonts - non-specific, but probably good enough if fallback is rare.
A list of fonts per locale - more specific than a single list, but potential poor cache performance if the character doesn't match the locale.
Mapping from character to font - most specific, but likely very poor cache hit rate.
A list of fonts per base font - better matching of font styles (esp serif vs sans-serif); more IPC. Perhaps best combined with one of the other options?
Comment 1 by bugdroid1@chromium.org
, Apr 22 2016