Please note: this doesn't help you with one-sheet music, it speeds up
book projects using mudela-book or standalone latex files using mudela
includes

Also note this is for 1.3.39, but diffs will hopefully apply for subsequent
realeases, too (maybe with fuzz)

I. NO WARRANTY
 Yeah

II. To the deal:
 1. apply this patch to mudela-book executable:

--- mudela-book~        Tue Mar 28 19:31:28 2000
+++ mudela-book Fri Mar 31 22:11:16 2000
@@ -688,7 +688,7 @@
                system ('lilypond %s %s' % (lilyopts, texfiles))
 
        for e in eps:
-               cmd = r"""tex '\nonstopmode \input %s'; dvips -E -o %s %s""" % \
+               cmd = r"""tex '\nonstopmode \input hack.tex \input %s'; dvips -E -o %s 
+%s""" % \
                      (e, e + '.eps', e)
                system (cmd)

 2. Put a hack.tex in your mudela-book output directory, in this format:
   a) first line says "\special{! %" (no quotes)
   b) cut & paste contents of file lily.ps, usually in prefix/share/lilypond/ps
   c) last line says "}\turnOnPostScript" (no quotes)
 3. Apply this patch to lily.scm, usually in prefix/share/lilypond/scm

--- lily.scm    Tue Mar 28 19:30:26 2000
+++ lily.scm.new        Fri Mar 31 21:41:52 2000
@@ -309,16 +309,17 @@
 
   (define (header-end)
     (string-append
-     "\\special{! "
-
-     ;; URG: ly-gulp-file: now we can't use scm output without Lily
-     (if use-regex
-        ;; fixed in 1.3.4 for powerpc -- broken on Windows
-        (regexp-substitute/global #f "\n"
-                                  (ly-gulp-file "lily.ps") 'pre " %\n" 'post)
-        (ly-gulp-file "lily.ps"))
-     "}"
-     "\\input lilyponddefs \\turnOnPostScript"))
+;     "\\special{! "
+;
+;     ;; URG: ly-gulp-file: now we can't use scm output without Lily
+;     (if use-regex
+;       ;; fixed in 1.3.4 for powerpc -- broken on Windows
+;       (regexp-substitute/global #f "\n"
+;                                 (ly-gulp-file "lily.ps") 'pre " %\n" 'post)
+;       (ly-gulp-file "lily.ps"))
+;     "}"
+;     "\\turnOnPostScript"
+    ""))
 
   (define (header creator generate) 
     (string-append

 4. I assume TeTeX here, if you have another distrib, I hope you'll
    figure it yourself, using this as example :)
    go to the root of your TeX tree (mine is in /usr/share/texmf)
    a) cd to tex/latex/base and remove that \dump at the end of file,
       then go back
    b) cd to tex/latex/config and add lines "\input lilyponddefs" and
       "\dump" before "\endinput" line to the latex.ini file.
    c) run 'initex latex.ini' and copy appeared latex.fmt to
       YOURTEXROOT/web2c/my.fmt, then go back
    d) cd to tex/plain/config and insert "\input lilyponddefs" line
       before line with \dump in tex.ini; run 'initex tex.ini';
       copy resulted tex.fmt over YOURTEXROOT/web2c/tex.fmt
    e) run texhash (or whatlike)
 5. add line "\input hack.tex" or whatlike after preamble but before
    \begin{document} in your latex file or after preamble in tex
    master file
 6. run latex on your files using smth like 'latex \&my yourfile.tex',
    tex doesn't suffer such a penalty :)

Voila! LILYPOND IS 50% FASTER NOW, postscript files are smaller
AND FASTER, TOO!

Enjoy

to Han-Wen: Well, it's a hackiest hack, but full solution would require
adding a command-line parameter to lilypond to exclude ps funcs and
hacking mudela-book to prepend them before known epses as well as
before known master file. You see, I don't know nor python nor scheme as yet
so I couldn't charge here :(

August

P.S. Speed increase may be not so large, it depends on possible
throughput and avg seek time of your hard disks (The digits provided
are for my ultra-dma 33 seagate), so if you run lilypond in ram disk
installation, you won't notice any difference in speed :)

Reply via email to