I agree, benchmark just the lilypond invocation and you're likely to find it 
still takes just a second. More likely, in some following step the server CGI 
script writes the HTTP response data but never closes the TCP connection. If 
the script exits, perhaps a child process has been forked that is keeping the 
file descriptor open, or apache needs some clue when it's to be closed. If the 
server never closes the connection, the browser will give up after a timeout 
period, and only then display what it received.

Cheers,
Curt McDowell


-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Jan 
Nieuwenhuizen
Sent: Wednesday, September 18, 2013 11:59 PM
To: [email protected]
Cc: [email protected]
Subject: Re: lilypond slowdown in CGI web program

Jim Tisdall writes:

> 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.

Are you certain that it's lilypond that takes so long?  Have you replaced 
lilypond with a script that does something like

   #! /bin/bash
   date >> /tmp/lily.log
   time ./lilypond.bin "$@" >> /tmp/lily.log 2>&1
   # time echo NOT: ./lilypond.bin "$@" >> /tmp/lily.log 2>&1
   date >> /tmp/lily.log

comment in/out the run lilypond/echo lilypond commands and play with that?

Also, what are you building?  I take it that you have seen

   http://weblily.net
   http://lilybin.com
   http://lilypond.org/schikkers

and

   https://www.mediawiki.org/wiki/Extension:Score
   https://www.mediawiki.org/wiki/Project:Sandbox

Greetings, Jan

--
Jan Nieuwenhuizen <[email protected]> | GNU LilyPond http://lilypond.org 
Freelance IT http://JoyofSource.com | AvatarĀ®  http://AvatarAcademy.nl  

_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user


_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to