Possible Optimization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Possible optimization


I'm using a CGI program that includes fontconfig. (http://www.websequencediagrams.com). I noticed that when I ran my program from the command line, it was taking 0.025 s to run. However, when apache2 ran it, it took about 1.5 seconds every time. This is even after running 'fc-cache -f' as root.

The culprit was fontconfig. In the /etc/fonts/fonts.conf supplied with Ubuntu 7.04, we have:


When run by the www-data user (as a cgi-script), there is no ~/.fontconfig, so it was regenerating the cache each time.

Executing "chmod a+w -R /var/cache/fontconfig" solved the problem. Now fontconfig is fast even when executed by a cgi program.

I'm trying to understand what is happening here. Why can fontconfig only use the /var/cache/fontconfig folder if it is writable? And why does it regenerate the cache every time, even after fc-cache is run?

Fontconfig mailing list

[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux