This is preparation/accompanying project to my school thesis.

Fontconfig is library that keeps database of fonts installed in system and gives applications ability to query it. Fontconfig is currently searching the database in naive way and can be quite slow if there is many fonts installed. Most applications make several font queries when starting and fontconfig is slowing down their start.

I want to explore what kind of queries are most common and experiment with optimizing fontconfig for them. Plus prepare some benchmarks and tests to help with measuring and testing for correctness.

Looking for mad skills in:

Nothing? Add some keywords!

This project is part of:

Hack Week 15

Activity


Comments

  • michalsrb
    almost 3 years ago by michalsrb | Reply

    Tests and benchmarks: https://github.com/michalsrb/fontconfigtests

    Experimental optimizations: https://github.com/michalsrb/fontconfig

    Speedups so far:

    Benchmark                               Time              Old           New
    ---------------------------------------------------------------------------
    FontMatch/common_kde_1                 -0.98      15765243 ns     322476 ns
    FontMatch/common_gnome_1               -0.61      15344023 ns    5975109 ns
    FontMatch/common_chromium_1            -0.60      15106001 ns    6042884 ns
    FontMatch/common_firefox_1             -0.58      14131375 ns    5998516 ns
    FontMatch/empty_pattern                -1.00        324894 ns        621 ns
    FontMatch/existing_file                -0.83       1755908 ns     298664 ns
    FontMatch/not_existing_file            -0.83       1759973 ns     299809 ns
    FontMatch/existing_file_with_globs     -0.86       2101003 ns     299053 ns
    FontMatch/existing_family              -0.35        452647 ns     292617 ns
    FontMatch/not_existing_family          -0.04        446150 ns     428687 ns
    FontSort/common_kde_1                  -0.41      16694229 ns    9938746 ns
    FontSort/common_kde_2                  -0.21      10993081 ns    8646657 ns
    FontSort/common_firefox_1              -0.34      16684090 ns   11008502 ns
    FontSort/common_firefox_2              -0.40      17589659 ns   10637453 ns
    FontSort/common_firefox_3              -0.30      10923228 ns    7685467 ns
    FontSort/empty_pattern                 +0.03       2381994 ns    2465136 ns
    FontList/empty_pattern                 -0.06       7764091 ns    7306565 ns
    FontList/existing_file                 -0.44       1528245 ns     855962 ns
    FontList/not_existing_file             -0.43       1521264 ns     861424 ns
    FontList/existing_file_with_globs      -0.44       1440867 ns     802007 ns
    FontList/existing_family               -0.22        279715 ns     219578 ns
    FontList/not_existing_family           -0.21        266335 ns     211260 ns
    

Similar Projects

This project is one of its kind!