lilypond-user
[Top][All Lists]
Advanced

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

Re: lilypond slowdown in CGI web program


From: Jim Tisdall
Subject: Re: lilypond slowdown in CGI web program
Date: Tue, 24 Sep 2013 18:52:42 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130801 Thunderbird/17.0.8

No one else reported the same problem on mac w/apache
(or anywhere else) -- in brief, a 30 second delay running lilypond
called from web page.

But just to finish up, I did get some expert attention and I tried
several things, and *something* worked, but I'm not sure what was
the change that actually solved the problem.

After including the
original post, I append some of the troubleshooting exchanges,
and, as I say, something did finally work.  (And by the way, I
tried all sorts of things, permissions, apache config files,
ad infinitum in a subjective sense.)

Thanks to Jan Nieuwenhuizen.

On 9/18/13 8:55 PM, Jim Tisdall wrote:
Hi, I'm going to briefly sketch this problem, just to see if anyone
else has come across it ... and because being specific would be a
real bear, given the interacting systems involved ...

When I call lilypond to compile a score by means of a web page
that is using CGI, lilypond takes about 25 seconds to
*successfully* complete.  From the commandline,
same files and flags, under a second; from a similar but non-web
program, under a second.

Has anyone else encountered this kind of behavior?

I have many similar scripts that call all sorts of programs under
the same (perl CGI) (apache2) (mac) unix server, no problems.
Problem appears on all attempted web browsers, so seems to be
in the lilypond-apache interaction.  My knowledge of python is slim
and of scheme is rusty; c and perl okay.  Many googles of various
ideas over several months have not worked.  I have seen some stuff
about python slowdowns and fixes, but not sure what to do with that.
I admit I've not dug too deeply into lilypond source code yet, my
c is okay (I'm a bell labs c programmer in a former incarnation.)

I've tried many different flags ... here's the current set:
/Applications/LilyPond.app/Contents/Resources/bin/lilypond
-dmidi-extension=mid -fps -fpng -dbackend=eps
-deps-box-padding=3.000000 --output=basename lilyfile

Thanks for listening ;>) -- Jim Tisdall



Jan,

...  In this whodunnit
my pick for the villain is FcFontSetList rescan 30 second timeout as detailed 
following.

Peace,
Jim

In more (and perhaps unwanted) detail:

...


Assuming that you're right, though, what I can imagine is something
like fontconfig's setup running each time and failing to write its
cache.

Ah, I like the sound of that.  I'm not familiar with the system, but
I look and I find
/Applications/LilyPond.app/Contents/Resources/etc/fonts/fonts.conf
in which are
<!-- Font cache directory list -->

        <cachedir>/usr/var/cache/fontconfig</cachedir>
        <cachedir>~/.fontconfig</cachedir>

and, tantalizingly, at the end of the fonts.conf file I find
<!--
  Rescan configuration every 30 seconds when FcFontSetList is called
 -->
                <rescan>
                        <int>30</int>
                </rescan>
        </config>

</fontconfig>

...

There is no /usr/var/cache on my system

a "locate cache/fontconfig" leads me to this (among others):
$ ls -ld /Applications/LilyPond.app/Contents/Resources/var/cache/fontconfig
drwxr-xr-x@ 2 tisdall  staff  68 Jan  4  2013 
/Applications/LilyPond.app/Contents/Resources/var/cache/fontconfig

So, no write permissions for group or other.  Also, the directory is
empty.  What the hell, I try,
chmod 777 /Applications/LilyPond.app/Contents/Resources/var/cache/fontconfig

didn't solve the problem.



Have you tried running this lilypond command as the same user as the
cgi is running under?

...

I see an error message
*** Warning: GenericResourceDir doesn't point to a valid resource directory.
               the -sGenericResourceDir=... option can be used to set this.

There is a lot of font stuff including warnings.  Looks like it's setting up 
caches,
and then probably the FcFontSetList rescan 30seconds configuration kicks in ...
it's an attractive theory.

To repeat: I attach the verbose output.  I realize you are busy, hopefully 
you've got me started
down the happy path, thanks so much I really appreciate this.


Try setting LILYPOND_VERBOSE=1


I also reinstalled, and further installed the development version.



reply via email to

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