[cairo] 1.1.6 to 1.2.0 performance

John Ellson ellson at research.att.com
Tue Jul 11 05:39:54 PDT 2006


David Turner wrote:
> Hello John,
>
>
>> I suspect the problem is fontconfig.
>>
>> I'm a graphviz developer, and dot, which is a command line utility 
>> from graphviz, uses: pango+cairo+fontconfig+freetype
>> Every time I run dot it opens 940 files in /var/cache fontconfig  
>> just to resolve "Times-Roman" !
>>
>>    $ strace dot hello.dot 2>&1 | grep open | grep 
>> /var/cache/fontconfig | wc
>>        940    3760   79900
>>
>> Its not a problem specific to graphviz, or even cairo.  The 
>> fontconfig utility fc-match has the same problem:
>>
>>    $ strace /usr/bin/fc-match serif 2>&1 | grep open | grep 
>> /var/cache/fontconfig | wc
>>        940    3760   79900
>>
>> Perhaps this doesn't matter much for a gui appplication, but its a 
>> major problem for command line, or web-server applications.
>>
> A recent version of fontconfig should be able to use a global cache, 
> instead of having to re-open all font files
> on startup. Moreover, FreeType 2.2.1 and later contain several 
> speed-ups that might affect performance
> positively when opening a lot of font files.
>
> it'd be interesting to know which versions of these libraries you're 
> using.

I'm using the latest available version on Fedora Development:
    fontconfig-2.3.95-4
    freetype-2.2.1-2

John



More information about the cairo mailing list