[Fontconfig] Fontconfig performance question.
Owen Taylor
otaylor at redhat.com
Fri May 9 01:05:18 EST 2003
On Thu, 2003-05-08 at 08:23, Krzysztof Dabrowski wrote:
> > And since font configuration rarely changes, then it could be loaded only
> > one, then saved to disk for other applications to use and have a reasonable
> > TTL (a day/week/whatever).
>
> Or the whole configuration could be put into shared memory and then used
> directly by other instances of the library. Correct me, but this seems to be
> the fastest option...
Some sort of shared-memory scheme could certainly be helpful in
also cutting down the memory usage of fontconfig, which, while it
is much better than it used to be, is still far from tiny.
IMO, probably better than using SysV shared memory (which would
require a daemon) is to write a file to disk that can be mem-mapped
in a shared fashion by the various processes.
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.
An intermediate possibility might be to try to keep things like strings
and coverage tables in a shared segment, but create real FcPattern
structures in non-shared memory that point to the shared segment.
Regards,
Owen
(BTW - I seem to recall some significant speedups that could be made
in the parsing code when I looked at it.)
More information about the Fontconfig
mailing list