[Fontconfig] performance issue questions

L. A. Walsh fonts at tlinx.org
Mon Nov 28 23:26:28 UTC 2016


Keith Packard wrote:
> Akira TAGOH <akira at tagoh.org> writes:
>
>   
>> what if some processes is updating the same cache?
>> what if some processes are updating caches for additions during updating
>> caches for deletion? and so on. FWIW this isn't a paranoid. is examples
>> actually happened in the past.
>>     
---
    It seems locking would be a good thing.
>
> The code was designed so that the cache could be computed in parallel by
> many processes, but that some process would see the 'current' state of
> the system and write a correct cache file.
>
> I remain mystified as to why this doesn't actually work; is it file
> systems with coarse (1s) timestamps causing troubles? Or can someone
> construct a sequence of operations which cannot be satisfied by this
> process, even with arbitrarily precise timestamps?
>   
----
    I'm not sure I would involve the filesystems, *at all*, as they
are usually a bottleneck.  Better to use some IPC and, ideally,
only dump finished data sets to disk.

    One perlscript I'd wrote to query hundreds to 10's of thousands
of rpms on disk (very disk intensive), ended up w/me using
"tmp files" in RAM (in /dev/shm) that's used by the SysV
'shm' mechanism (ipc(5)).  I'd intended to use the shm mechanism
directly, but after I got it working with the mem-based tmp files,
I didn't feel a need to go farther (it was enough work to get
that case working).







More information about the Fontconfig mailing list