[Fontconfig] Re: Structure of cache files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Keith Packard wrote:
> I think you need to copy the other architectures into the new file and
> unlink the old one; there's no other way to avoid destroying existing
> running applications images of the cache file.
> 
> Oh, would resetting the mod time on the cache file be useful in avoiding
> thrashing among multiple architectures? By checking whether the existing
> timestamp was "new enough", and re-using that value for the new file, we
> would then just always use the cache file timestamp itself.

What about if we used FcAtomic to write the directory cache files?  Then
any apps using the old cache files will just have a descriptor pointing
to the old file and won't be affected by writes to a new cache file and
the unlinking of the old cache file.  Does that work properly over
networked file systems?

I think that the proper thing to do is to always create a new file.  If
the rest of the data is not stale, then copy other segments from old
file to new file.  Then unlink the old file.

I don't think resetting the mod time would suffice: that doesn't tell
you that you even updated the current section, so it seems to me that
you just have no clue.

pat



[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux