Patrick Lam <plam@xxxxxxx> さんは書きました: > 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
diff -ru fontconfig-2.3.94.orig/src/fccache.c fontconfig-2.3.94/src/fccache.c --- fontconfig-2.3.94.orig/src/fccache.c 2006-03-23 13:21:50.000000000 +0100 +++ fontconfig-2.3.94/src/fccache.c 2006-03-23 18:34:44.000000000 +0100 @@ -206,7 +206,7 @@ current_arch_start = FcCacheSkipToArch(cache->fd, current_arch_machine_name); if (current_arch_start < 0) - goto bail_and_destroy; + goto bail1; lseek (cache->fd, current_arch_start, SEEK_SET); if (!FcCacheReadString (cache->fd, candidate_arch_machine_name, @@ -644,6 +644,7 @@ if (strcmp (candidate_arch, arch)==0) return current_arch_start; current_arch_start += bs; + current_arch_start = FcCacheNextOffset (current_arch_start); } return -1;
-- Mike FABIAN <mfabian@xxxxxxx> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
_______________________________________________ Fontconfig mailing list Fontconfig@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/fontconfig