[Fontconfig] Fontconfig performance question.

Keith Packard keithp at keithp.com
Fri May 9 01:40:57 EST 2003

Around 11 o'clock on May 8, Owen Taylor wrote:

> But there are various difficulties; for instance the format of 
> this memmapped would have either  be independent of endianess and
> alignment, or saved per-machine.

A brute-force approach would be to define structures to pad appropriately 
(as the X headers do) and then permit entries for both byte orders.

Define the file format at the byte level and then make sure C structures 
can map it accurately on known machines.  Suitable testing during 
configuration will ascertain whether the library can be compiled 
conformantly on new machines.

One possible problem here is that FcFontSort currently returns only 
references to the font patterns.  I think the FcPattern structure will 
need some rework to make sure this is still possible.  Thank goodness for 
opaque data structures.

> (BTW - I seem to recall some significant speedups that could be made
> in the parsing code when I looked at it.)

There's a patch in fontconfig bugzilla which has some useful 
optimizations, but I felt it would be better to have a wholesale redesign 
fo the file format to wring as much improvement as possible.


More information about the Fontconfig mailing list