[Fontconfig] Re: Format of cache file are different on 32bit and 64bit system.

Patrick Lam plam at MIT.EDU
Fri Mar 24 07:40:33 PST 2006


Mike FABIAN wrote:
> Patrick Lam <plam at MIT.EDU> さんは書きました:
> 
> 
>>Zhe Su wrote:
>>
>>>Hi,
>>>  Recently I found that format of fonts.cache-2 file are different on
>>>32bit and 64bit system. It leads big performance issue for 32bit
>>>applications on 32bit/64bit mixed system, like x86_64. Because 32bit
>>>applications must re-create local cache file on startup, almost every
>>>time.
>>>  For more information, see https://bugzilla.novell.com/show_bug.cgi?id=160226
>>>  Is it possible to unify the cache file format for both 32bit and
>>>64bit system?
>>
>>That bug is not world readable.
>>
>>I designed the cache format so that it would contain caches for both
>>32bit and 64bit systems in the same file.  It may not work; I'll look
>>into it tomorrow.
> 
> 
> I think I have fixed it, see also
> 
>     http://bugzilla.novell.com/show_bug.cgi?id=160226

fc-cache32 would be a fine solution to the dir caches problem, if you 
can generate that binary.

Your patch makes things better but doesn't completely fix the problem 
yet.  I'm looking into it.

The system I'm on here is amd64 with an ia32 chroot.  /home is shared 
between the amd64 install and the chroot.

1. remove a fonts.cache-2 file (dir cache) from both the install and the 
chroot
2. fc-list in the install
3. fc-list in the chroot
4. fc-cat ~/.fonts.cache-2 in the install

You'll see that the install's .fonts.cache-2 gets trampled by the 
chroot's .fonts.cache-2.

Note also that the line you patched was a fix to 'severe perf regression 
when global fonts.cache-2 files are missing', which you and I tested 
back in October 2005.  I'm going to test that behaviour as well (put 
junk in .fonts.cache-2, see what happens).

pat


More information about the Fontconfig mailing list