[Fontconfig] Application startup performance

Akira TAGOH akira at tagoh.org
Mon Jan 11 20:12:31 PST 2016

On Tue, Jan 12, 2016 at 12:28 PM, Keith Packard <keithp at keithp.com> wrote:
> Those should still be caught by having the directory timestamps in the
> cache files, read before the directory is scanned so that changes after
> scanning starts eventually get caught.

Right. but requiring fc-cache -f to update the cache takes a long
time. and updating fonts in the same directory often happens in distro
which causes an extra cost by fc-cache -f.

>> I still think we should have only single process to update caches to
>> keep consistency. though you disagree with that idea.
> Keeping that invariant would require locking, which means either only
> updating caches when the user runs fc-cache, or doing locking within
> processes. The former means missing some font updates unless fc-cache is
> always run, the latter means risking locking up the desktop if some
> application fails.

I'm assuming having a daemon process which watches the font
directories and obsoletes fc-cache by the hand though. I don't think
there are more risks than now. concerns with it may be the update of
caches asynchronously happens to applications, which doesn't block
them. or missing updates when it is gone for some reason. later one
can be worked around in some way though.

> --
> -keith


More information about the Fontconfig mailing list