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

Owen Taylor otaylor at redhat.com
Sat Mar 25 11:45:46 PST 2006


On Thu, 2006-03-23 at 01:24 -0500, Patrick Lam wrote:
> 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.
> 
> Fundamentally it's impossible to use the same mmapped structures for 
> both the 32bit and 64bit architectures, so in principle there should be 
> two copies of the data in the cache file.

While I'm not going to encourage changing the file format, at this
point :-), the "fundamentally it's impossible" statement strikes me as
incorrect ... the GTK+ memmapped cache file formats, are, for example,
architecture independent.

If you rely on simply dumping native structures onto disk, how do you
deal with differences in architecture and endianess for, say, cache
files in a NFS mounted home directory? Or are there copies for 
every architecture in the file, not just 32/64 bit?

						Owen




More information about the Fontconfig mailing list