lilypond-user
[Top][All Lists]
Advanced

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

Re: mac web fontconfig slowdown


From: Jim Tisdall
Subject: Re: mac web fontconfig slowdown
Date: Thu, 4 Feb 2016 10:56:22 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.5.1

I seem to have found a fix ...

Message: 5
Date: Wed, 3 Feb 2016 19:06:21 -0500
From: Jim Tisdall <address@hidden>
To: address@hidden
Subject: mac web fontconfig slowdown
Message-ID: <address@hidden>

on mac os x 10.11.2, lilypond 2.18.2, plenty nice mac pro plenty ram

Serious slowdown due to font configuration - 30 seconds delay
while "FontConfig" is called - happens when you do a
lilypond -V   for instance.

Fixed from command line using /opt/local/bin/fc-cache
for each user (root, me, ...) which creates files
.lilypond-fonts.cache-2 in home directories

But I still have delay problem running lilypond from a web program -
I use user:group _www:_www which works fine for everything but this.
30 second delay.  (No home directory for _www due to security)

(First, I believe it was lilypond -V, not fc-cache, that
as creating the .lilypond-fonts.cache-2 files.  Anyway ...)


To fix for web operation, an apache2 httpd that uses
  User/Group _www/_www where _www has no login directory)

    Edit

/Applications/LilyPond.app/Contents/Resources/etc/fonts/local.conf

    change

<cachedir>~/.lilypond-fonts.cache-2</cachedir>
    to
<cachedir>.lilypond-fonts.cache-2</cachedir>

    cd to cgi-bin, which on my system is

root# cd /Applications/WebServer/CGI-Executables

    and run

root# /Applications/LilyPond.app/Contents/Resources/bin/lilypond -V

which creates a cache in my cgi-bin called .lilypond-fonts.cache-2

--> That did it! The web program now takes 1 second on a small score instead of 30 seconds

    I then re-edited
/Applications/LilyPond.app/Contents/Resources/etc/fonts/local.conf

    so that both these lines appear one after the other:

<cachedir>~/.lilypond-fonts.cache-2</cachedir>
<cachedir>.lilypond-fonts.cache-2</cachedir>

    That's so that when a home directory can be found,
    lilypond will use the cache there instead of the one in cgi-bin

(Caveat: there well may be an easier way to accomplish this - but this
works at least.)  (Thanks to Jacques Menu for looking at this problem.)

Jim



reply via email to

[Prev in Thread] Current Thread [Next in Thread]