[Fontconfig] Slow startup of trivial GNOME 2.6 applications
Phil Race
Phil.Race at Sun.COM
Thu Oct 21 04:41:33 EST 2004
Hi Keith,
> There was a bug in some older versions of fontconfig which would not
> correctly update the per-user cache file in all circumstances.
Interesting. I have a follow-up question of sorts relating
to what goes into the per-user cache when there is no per-directory
cache. At one point I was under the impression that you'd get
something equivalent but now I'm not so sure.
As a data point with the caches built as root a small test
program which calls :
pattern = FcPatternBuild(NULL, FC_OUTLINE, FcTypeBool, FcTrue,(char*)0);
objset = FcObjectSetBuild(FC_FILE, 0);
fontSet = FcFontList (0, pattern, objset);
executes these 3 lines in approx 0.3 seconds on a fairly dated system
but which is running Solaris 10 with Gnome 2.6. That's more than
you'd like but that's just for comparison with the results
below.
The same program with no root built cache has to build
the user cache and takes 227 seconds (almost 4 minutes!)
I get a 587Kbyte user cache file at the end
Executing that program again, with this up to date user cache
still takes 195 seconds. So there's apparently still a lot of
work that needs to be done that's not cached.
I don't know exactly what version of fontconfig is in gnome 2.6
but does that qualify as one of the older fontconfigs that exhibited
the problem you mentioned?
Or is this query just doing something that can never be satisfied by
a per-user cache.
-phil.
Keith Packard wrote:
> Around 12 o'clock on Oct 20, Stefaan A Eeckels wrote:
>
>
>>A bit of trussing reveals that even the most trivial
>>of programs performs a full scan of all the available
>>font files on the system.
>
>
> There was a bug in some older versions of fontconfig which would not
> correctly update the per-user cache file in all circumstances. You may be
> hitting that here. To work around it, make sure your per-directory cache
> files are all up-to-date by running fc-cache
>
> When this is working, fontconfig should check only the timestamps on the
> directories themselves, and not every font file.
>
> -keith
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> fontconfig mailing list
> fontconfig at freedesktop.org
> http://freedesktop.org/mailman/listinfo/fontconfig
More information about the Fontconfig
mailing list