[Fontconfig] Application startup performance
keithp at keithp.com
Mon Jan 11 19:28:44 PST 2016
Akira TAGOH <akira at tagoh.org> writes:
> What I've tried to address those issues some times was happened when
> installing some fonts packages in parallel and bring up multiple
> fc-cache from scriptlets. and the directory information becomes
> outdated because it is updated by installing fonts after collecting.
> To explain things, assuming there are two processes of fc-cache A and
> B say, run A first then B, and A finished then B. this doesn't break
> anything. but when A takes a bit long time which has old information,
> A rewrites old information after B. this breaks the cache. so that is
> trying to check the dir timestamp is up to date after writing the
> cache and then update if needed.
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.
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 810 bytes
Desc: not available
More information about the Fontconfig