[Fontconfig] Re: severe performance regression when global fonts.cache-2 files are missing

Mike FABIAN mfabian at suse.de
Fri Oct 21 09:05:52 EST 2005


Mike FABIAN <mfabian at suse.de> さんは書きました:

> This is very strange, certainly there is a bug but it appears to be
> not easy to reproduce.

I found that I can easily by writing some random junk into ~/.fonts.cache-2.
Like this:

mfabian at magellan:~$ echo "hello" > .fonts.cache-2
mfabian at magellan:~$ time fc-list "Luxi Sans" ; ls -l --time-style=full-iso .fonts.cache-2
Luxi Sans:style=Bold
Luxi Sans:style=Regular
Luxi Sans:style=Oblique
Luxi Sans:style=Bold Oblique

real	2m21.643s
user	0m50.751s
sys	0m3.060s
-rw-------  1 mfabian suse 4564178 2005-10-20 23:51:02.000000000 +0200 .fonts.cache-2
mfabian at magellan:~$ time fc-list "Luxi Sans" ; ls -l --time-style=full-iso .fonts.cache-2
Luxi Sans:style=Bold
Luxi Sans:style=Regular
Luxi Sans:style=Oblique
Luxi Sans:style=Bold Oblique

real	2m16.382s
user	0m50.819s
sys	0m2.968s
-rw-------  1 mfabian suse 9127122 2005-10-20 23:53:52.000000000 +0200 .fonts.cache-2
mfabian at magellan:~$ time fc-list "Luxi Sans" ; ls -l --time-style=full-iso .fonts.cache-2
Luxi Sans:style=Bold
Luxi Sans:style=Regular
Luxi Sans:style=Oblique
Luxi Sans:style=Bold Oblique

real	2m19.644s
user	0m50.855s
sys	0m3.008s
-rw-------  1 mfabian suse 13690066 2005-10-21 00:29:06.000000000 +0200 .fonts.cache-2
mfabian at magellan:~$ time fc-list "Luxi Sans" ; ls -l --time-style=full-iso .fonts.cache-2
Luxi Sans:style=Bold
Luxi Sans:style=Regular
Luxi Sans:style=Oblique
Luxi Sans:style=Bold Oblique

real	2m23.269s
user	0m50.883s
sys	0m3.060s
-rw-------  1 mfabian suse 18253010 2005-10-21 00:57:03.000000000 +0200 .fonts.cache-2
mfabian at magellan:~$

The first call of "fc-list" should have fixed the broken
~/.fonts.cache-2 file, but apparently this didn't work, subsequent
calls of "fc-list" continue to take a lot of time and the
~/.fonts.cache-2 file grows bigger and bigger with each call.

-- 
Mike FABIAN   <mfabian at suse.de>   http://www.suse.de/~mfabian
睡眠不足はいい仕事の敵だ。




More information about the Fontconfig mailing list