[Fontconfig] performance regression: fc-cache became slow when skipping

Mike FABIAN mfabian at suse.de
Wed Oct 12 01:33:46 EST 2005


With the new fontconfig 2.3.91 (CVS snapshot from 20051007):

    mfabian at magellan:~/.fonts$ fc-cache -V
    fontconfig version 2.3.91
    mfabian at magellan:~/.fonts$ time fc-cache -f -v .
    fc-cache: ".": caching, 71 fonts, 1 dirs
    fc-cache: "./kde-override": caching, 0 fonts, 0 dirs
    fc-cache: succeeded

    real    0m24.659s
    user    0m10.693s
    sys     0m0.172s
    mfabian at magellan:~/.fonts$ time fc-cache -v .
    fc-cache: ".": skipping, 71 fonts, 1 dirs
    fc-cache: "./kde-override": skipping, 0 fonts, 0 dirs
    fc-cache: succeeded

    real    0m14.288s
    user    0m10.585s
    sys     0m0.096s
    mfabian at magellan:~/.fonts$

I.e. the second run of fc-cache in the ~/.fonts directory not even
twice as fast as the first run.

If all cache files are already up to date, fc-cache should run
very fast, but with the new version of fontconfig it is
always very slow. 

This was much better with older versions of fontconfig which didn't
yet have the mmap feature:

    mfabian at rossini:~/.fonts$ fc-cache -V
    fontconfig version 2.3.2
    mfabian at rossini:~/.fonts$ time fc-cache -f -v .
    fc-cache: ".": caching, 71 fonts, 1 dirs
    fc-cache: "./kde-override": caching, 0 fonts, 0 dirs
    fc-cache: succeeded

    real    0m12.328s
    user    0m10.133s
    sys     0m0.104s
    mfabian at rossini:~/.fonts$ time fc-cache -v .
    fc-cache: ".": skipping, 71 fonts, 1 dirs
    fc-cache: "./kde-override": caching, 0 fonts, 0 dirs
    fc-cache: succeeded

    real    0m2.023s
    user    0m0.016s
    sys     0m0.000s
    mfabian at rossini:~/.fonts$

I.e. the second run is much faster here.

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




More information about the Fontconfig mailing list